Enhancement Activities on the Current Upstream Kernel for Mission-Critical Systems
|
|
- Amberly Hutchinson
- 6 years ago
- Views:
Transcription
1 Enhancement Activities on the Current Upstream Kernel for MissionCritical Systems Hitachi Ltd. Yoshihiro YUNOMAE
2 01 MissionCritical Systems We apply Linux to missioncritical systems. Banking systems/carrier backend systems/train management systems and more People(consumers/providers) expect stable operation for longterm use. Don't frequently change the system configuration Changing the system introduces the risk for illegal operation. "RAS" requirements are needed. 1
3 02 RAS Reliability To identify problems before release e.g. Bug fixing, Testing Availability To continue the operation even if a problem occurs e.g. HA cluster system Serviceability To find out the root cause of the problem certainly in order to be able to solve it permanently e.g. Logging, Tracing, Memory dump Do the systems satisfy these requirements in current upstream kernel? Will talk about 'R' and 'S' 2
4 Activities 1. Fix a deadlock problem on NMI dump (R) 2. Improve data reception latency on serial devices (R) 3. Save names of more processes in ftrace (S) 4. Solve the printk message fragmentation problem (S) 3
5 Activities 1. Fix a deadlock problem on NMI dump (R) 2. Improve data reception latency on serial devices (R) 3. Save names of more processes in ftrace (S) 4. Solve the printk message fragmentation problem (S) 4
6 11 Memory dump deadlock introduction We get memory dump via Kdump when serious problems, which induce panic or oops, occur. Kdump Kernel crash dumping feature based on Kexec 1. In 1 st kernel, kernel panic occurs. 2. Execute crash_kexec() in panic() and save the memory 3. Boot 2 nd kernel (capture kernel) and copy /proc/vmcore When kernel panic occurs via NMI, Kdump operation sometimes stops before booting 2 nd kernel. 1 st kernel panic 2 nd kernel capture /proc/vmcore crash_kexec() boot disk NW media 5
7 12 Memory dump deadlock reason The cause of the stop is deadlock on ioapic_lock in NMI context. panic()>crash_kexec()>>disable_ioapic() > >ioapic_read_entry() ioapic_read_entry() { raw_spin_lock_irqsave(&ioapic_lock, flags); eu.entry = ioapic_read_entry(apic, pin); raw_spin_unlock_irqstore(&ioapic_lock, flags); } The scenario is 1. Get ioapic_lock for rebalancing IRQ (irq_set_affinity) 2. Inject NMI while locking ioapic_lock 3. Panic caused by NMI occurs 4. Try to execute Kdump 5. Deadlock in ioapic_read_entry() 6
8 13 Memory dump deadlock fixing Fixed this problem by initializing ioapic_lock before disable_io_apic(): native_machine_crash_shutdown() { #ifdef CONFIG_X86_IO_APIC + /* Prevent crash_kexec() from deadlocking on ioapic_lock. */ + ioapic_zap_locks(); disable_io_apic(); #endif } This problem has been already fixed in current kernel. (from kernel3.11) 7
9 Activities 1. Fix a deadlock problem on NMI dump (R) 2. Improve data reception latency on serial devices (R) 3. Save names of more processes in ftrace (S) 4. Solve the printk message fragmentation problem (S) 8
10 21 Serial RX interrupt frequency introduction Serial devices are mainly used not only for embedded systems but also for missioncritical systems. Maintenance Sensor feedback Serial communication has the specialty that it is resistant for noise. For a control system(one of missioncritical systems), longdistance communication is needed. If we have a sensor which sends small data packages each time and must control a device based on the sensor feedback, the RX interrupt should be triggered for each packages. Sensor 1small data pkg Server 2RX int. dev dev App 4feedback 3read 9
11 22 Serial RX interrupt frequency problem A test requirement of a system was that the serial communication time between send and receive has to be within 3msec. When we measured the time on 16550A, it took 10msec. It did not change even if the receiver application was operated as a real time application. We analyzed this by using event tracer of ftrace. Hard IRQ of the serial device interrupts once each 10msec, so this is caused by a HW specification or the device driver. timestamp[sec] ~10msec <idle>0 [001] : irq_handler_entry: irq=4 name=serial <idle>0 [001] : irq_handler_entry: irq=4 name=serial <idle>0 [001] : irq_handler_entry: irq=4 name=serial <idle>0 [001] : irq_handler_entry: irq=4 name=serial 10
12 23 Serial RX interrupt frequency reason HW spec of 16550A 16bytes FIFO buffer Flow Control Register(FCR) 2bit register Changeable RX interrupt trigger of 1, 4, 8, or 14 bytes for the FIFO buffer (0b00=1byte, 0b01=4bytes, 0b10=8bytes, 0b11=14bytes) In Linux, the trigger is hardcoded as 8bytes. [PORT_16550A] = {.name = "16550A",.fifo_size = 16,.tx_loadsz = 16,.fcr = UART_FCR_ENABLE_FIFO UART_FCR_R_TRIG_10,.flags = UART_CAP_FIFO, }, For 9600baud, an interrupt per 10msec is consistent. 8bytes trigger (start + octet + stop * 2 + parity) / 9600(baud) = 1/800 (sec/byte) = 1.25(msec/byte) 1bit 8bit 1bit * 2 1bit 1.25(msec/byte) * 8(byte) = 10msec 11
13 24 Serial RX interrupt frequency temporary fixing Changed FCR as a test [PORT_16550A] = {.name = "16550A",.fifo_size = 16,.tx_loadsz = 16,.fcr = UART_FCR_ENABLE_FIFO UART_FCR_R_TRIG_00,.flags = UART_CAP_FIFO, }, 1byte trigger Result The interrupt frequency is once each 1.25msec. timestamp[sec] <idle>0 [001] : irq_handler_entry: irq=4 name=serial <idle>0 [001] : irq_handler_entry: irq=4 name=serial <idle>0 [001] : irq_handler_entry: irq=4 name=serial <idle>0 [001] : irq_handler_entry: irq=4 name=serial 1.25msec We need a configurable RX interrupt trigger. 12
14 25 Serial RX interrupt frequency tunable patch Added new I/F to the serial driver Tunable RX interrupt trigger frequency High frequency(1byte trigger) low latency Low frequency(14byte trigger) low CPU overhead Usability problems of 1 st /2 nd patch: Using ioctl(2) (c.f. using echo command is better) Interrupt frequency can be changed only after opening serial fd Cannot read FCR value (FCR is a writeonly register) Change the ioctl(2) to sysfs I/F after discussion in a Linux community Set the interrupt trigger byte (if val is invalid, nearest lower val is set.) # echo 1 > rx_int_trig /* 1byte trigger*/ User can read/write the trigger any time. The driver keeps FCR value if user changes interrupt trigger. 13
15 26 Serial RX interrupt frequency current status This new feature is under discussion. Sysfs I/F may be changed. But this feature (tunable RX trigger) will be merged soon. Current patch [PATCH V6] serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers 14
16 Activities 1. Fix a deadlock problem on NMI dump (R) 2. Improve data reception latency on serial devices (R) 3. Save names of more processes in ftrace (S) 4. Solve the printk message fragmentation problem (S) 15
17 31 PIDprocess name table in ftrace introduction ftrace is inkernel tracer for debugging and analyzing problems. ftrace records PIDs and process names in order to specify process context of an operation. If process name is indicated in a trace result, a user can understand who executed the program by doing grep with the process name. In the trace file, process names are sometimes output as <>: namepid <...>2625 [002] : sys_write(fd: 8, buf: 7fd0ef836968, count: 8) <...>2625 [002] : sys_enter: NR 1 (8, 7fd0ef836968, 8, 20, 0, a41) <...>2625 [002] : kfree: call_site=ffffffff810e410c ptr= (null) <...>2625 [002] : sys_write > 0x8 16
18 32 PIDprocess name table in ftrace reason ftrace has saved_cmdlines file storing the PIDprocess name mapping table. It stores the list of 128 processes that hit a tracepoint. # cat saved_cmdlines 13 ksoftirqd/ python 1718 gnomepanel 500 jbd2/sda58 If the number of processes that hit a tracepoint exceeds 128, the oldest process name is overwritten. How does ftrace manage this table? 17
19 33 PIDprocess name table in ftrace current Read trace file (get process name from PID) struct trace_entry{ int pid; } 1. Get a pid member in trace_entry structure of each trace event 18
20 34 PIDprocess name table in ftrace current Read trace file (get process name from PID) struct trace_entry{ int pid; } pid=1045 <PID> <map> map_pid_to_cmdline[] Get map# from map_pid_to_cmdline[]. The size of the array is PID_MAX_DEFAULT+1. 19
21 35 PIDprocess name table in ftrace current Read trace file (get process name from PID) struct trace_entry{ int pid; } pid=1045 <PID> <map> map_pid_to_cmdline[] 3 3. Get process name from saved_cmdlines[][]. saved_cmdlines 120 can hold 128 process names. 32 saved_cmdlines[][] <map> <process name> 0 rcu_bh 1 awk 2 bash 3 sleep 126 cat 127 kworker/0:1 20
22 36 PIDprocess name table in ftrace current Read trace file (get process name from PID) struct trace_entry{ int pid; } pid=1046 <PID> <map> map_pid_to_cmdline[] Get process name of PID=1046, but No map#, so it cannot find process name. The process name is shown as <...>
23 37 PIDprocess name table in ftrace current Store map information in saved_cmdlines map_cmdline_to_pid[] <idx> <PID> Record PID by rotation <PID> <map> 0 0 rcu_bh Managing the number of process names stored 1 in saved_cmdlines[][] 1 awk 2 bash map_pid_to_cmdline[] if ksoftirqd/0 (PID=1046) hits tracepoint, saved_cmdlines[][] <map> <process name> 3 sleep 126 cat 127 kworker/0:1 22
24 38 PIDprocess name table in ftrace current Store map information in saved_cmdlines map_cmdline_to_pid[] <idx> <PID> Overwrite this element 2 from 1045 to <PID> <map> map_pid_to_cmdline[] saved_cmdlines[][] <map> <process name> 0 rcu_bh 1 awk 2 bash 3 sleep 126 cat 127 kworker/0:1 23
25 39 PIDprocess name table in ftrace current Store map information in saved_cmdlines map_cmdline_to_pid[] <idx> <PID> <PID> <map> Delete old map# in order to avoid double 3 mapping map_pid_to_cmdline[] saved_cmdlines[][] <map> <process name> 0 rcu_bh 1 awk 2 bash 3 sleep 126 cat 127 kworker/0:1 24
26 310 PIDprocess name table in ftrace current Store map information in saved_cmdlines map_cmdline_to_pid[] <idx> <PID> <PID> <map> Overwrite the process name in map# map_pid_to_cmdline[] saved_cmdlines[][] <map> <process name> 0 rcu_bh 1 awk 2 bash 3 ksoftirqd/0 126 cat 127 kworker/0:1 25
27 310 PIDprocess name table in ftrace current Store map information in saved_cmdlines map_cmdline_to_pid[] <idx> <PID> <PID> <map> Develop tunable 120 I/F map_pid_to_cmdline[] 3 saved_cmdlines[][] <map> <process name> 0 rcu_bh 1 awk 2 bash 3 ksoftirqd/0 126 cat 127 kworker/0:1 26
28 311 PIDprocess name table in ftrace tunable patch We added the changeable I/F 'nr_saved_cmdlines' to expand the max number of saved process names. Read/write nr_saved_cmdlines For write, all saved_cmdlines information are cleared. Max size: PID_MAX_DEFAULT(32768) If we set 32768, all process names can be stored. # cat nr_saved_cmdlines 128 /* defalut value*/ # echo 1024 > nr_saved_cmdlines /* Switch to new saved_cmdlines buffers*/ # cat nr_saved_cmdlines 1024 /* Store 1024 process names */ 27
29 312 PIDprocess name table in ftrace current status Current patch Any comments are welcome! [PATCH V2 0/2] ftrace: Introduce the new I/F "nr_saved_cmdlines" 28
30 Activities 1. Fix a deadlock problem on NMI dump (R) 2. Improve data reception latency on serial devices (R) 3. Save names of more processes in ftrace (S) 4. Solve the printk message fragmentation problem (S) 29
31 41 printk fragmentation problem introduction printk message outputs error logging or debugging information in kernel. We handle automatically printk messages in user space in order to detect that the system has became unstable. We want the kernel to output printk as expected. printk messages are sometimes mixed with similar messages. It is difficult to automatically handle an event from mixed messages. mixed kernel messages Which process does this message belong to? [ ] sd 2:0:0:0: [sdb] [ ] sd 3:0:0:0: [sdc] Unhandled sense code [ ] sd 3:0:0:0: [sdc] [ ] Result: hostbyte=did_ok driverbyte=driver_sense [ ] sd 3:0:0:0: [sdc] [ ] Sense Key : Medium Error [current] [ ] Sense Key : Recovered Error [ ] [current] 30
32 42 printk fragmentation problem introduction Mixed messages can occur when multiple printk() are executed at the same time. <CPU0> <CPU1> printk("sd 2:0:0:0: [sdb] n"); break into printk("sd 3:0:0:0: [sdc] n"); printk("sense Key : Medium Error n"); printk("sense Key : Recovered Error n"); [ ] sd 2:0:0:0: [sdb] [ ] sd 3:0:0:0: [sdc] [ ] Sense Key : Medium Error [current] [ ] Sense Key : Recovered Error We named this problem "the owner problem". 31
33 43 printk fragmentation problem introduction Continuous printk messages with KERN_CONT can be also fragmented. [ ] sd 2:0:0:0: [sdb] Divide [ ] sd 3:0:0:0: [sdc] CDB: [ ] Read(10): [ ] Add. Sense: Failure prediction threshold exceeded [ ] 00 [ ] e We named this problem "the reconstruction problem". To solve this problem, we must solve the owner problem first. Owner information is needed. reconstruction [ ] sd 2:0:0:0: [sdb] [ ] sd 3:0:0:0: [sdc] CDB: [ ] Read(10): e [ ] Add. Sense: Failure prediction threshold exceeded 32
34 44 printk fragmentation problem Solution How to solve 1. Store all continuous messages in local buffer as temporary, and execute printk There is some related work about error messages in SCSI layer. Acceptance activities take a lot of time 1018(pr_cont) + 555(KERN_CONT) (just printk("") without " n")@3.15rc1+ problem not solved fundamentally Always have to take care about this problem 2. Add information necessary to merge all fragmented printk messages What kind of information can we merge those by? 33
35 45 printk fragmentation problem Key idea What kind of information can we merge those by? Add context information (especially, PID and IRQ context) to each message Solve the owner problem A tool can separate each process's message from mixed messages PID: Different CPU's process or not / Kernel preemption IRQ: In interrupt (hard/soft/nmi) context or not Add fragment flag Solves the reconstruction problem A tool can rebuild fragmented messages Don't add the flag for messages with ' n' This message itself is not fragmented. 34
36 45 printk fragmentation problem Key idea What kind of information can we merge those by? Add context information (especially, PID and IRQ context) to each message Solve the owner problem A tool can separate each process's message from mixed messages PID: Different CPU's process or not / Kernel preemption IRQ: In interrupt (hard/soft/nmi) context or not Add fragment flag But, don't Solves want the reconstruction to change dmesg problem and syslog messages. A How tool can do rebuild we fragmented tackle this messages problem? Don't add the flag for messages with ' n' This message itself is not fragmented. 35
37 46 printk fragmentation problem No msg change Key idea: Use the header information of /dev/kmsg /dev/kmsg is user I/F for accessing the printk buffer. /dev/kmsg has header and text fields separated by a ';'. 6,808, ,;Switched to clocksource tsc header text Header field is separated by a ','. <prefix>,<sequence#>,<timestamp>,<fragment flag>;<text> We can add any commaseparated flags before a ';' according to the documentation. Future extensions might add more comma separated values before the terminating ';'. Documentation/ABI/testing/devkmsg We add context information and flag to the header of /dev/kmsg. 36
38 47 printk fragmentation problem approach(1) Our apporach (1) Add process context information (PID and interrupt context) We can understand relationship of mixed messages. This does not indicate where the message is fragmented. Test: Run 2 kernel threads which output same 3 printk messages. pr_info("a1"); printk("a2"); printk("a3 n"); current result 6,3321, ,;A1 6,3322, ,c;A1 4,3323, ,+;A2 4,3324, ,+;A3 4,3325, ,c;A2 4,3326, ,+;A3 normally <header>;a1a2a3 <header>;a1a2a3... Who output this message? Who does the message belong to? 37
39 48 printk fragmentation problem approach(1) Our apporach (1) Add process context information (PID and interrupt context) We can understand relationship of mixed messages. This does not indicate where the message is fragmented. Test: Run 2 kernel threads which output same 3 printk messages. pr_info("a1"); printk("a2"); printk("a3 n"); normally <header>;a1a2a3 <header>;a1a2a3... applying our approach(1) 6,2308, ,,622/;A1 6,2309, ,c,621/;A1 4,2310, ,+,621/;A2 4,2311, ,+,621/;A3 4,2312, ,c,622/;A2 4,2313, ,+,622/;A3 Add context information <PID>/<interrupt context> s: softirq h: hardirq n: NMI : no interrupt context 38
40 49 printk fragmentation problem approach(2) Our apporach (2) Current "fragment flag" Three types c: first fragment of a line +: all following fragments : no fragment Just hint whether fragmentation occurred or not (i.e. sometimes incorrect) Users can roughly understand where messages were divided. Note, that these hints about continuation lines are not necessarily correct, and the stream could be interleaved with unrelated messages, but merging the lines in the output usually produces better human readable results. Documentation/ABI/testing/devkmsg 39
41 410 printk fragmentation problem approach(2) Our apporach (2) Test: Run three kernel threads A, B, and C which output following 3 messages. pr_info("{a, B, C}1"); printk("{a, B, C}2"); printk("{a, B, C}3 n"); normally Result by applying only approach(1) 6,225186, ,,2288/;B1 6,225187, ,c,2289/;C1 4,225188, ,+,2289/;C2 4,225189, ,+,2289/;C3 6,225190, ,c,2289/;C1 4,225191, ,+,2289/;C2C3 4,225192, ,,2288/;B2 6,225193, ,c,2287/;A1 4,225194, ,+,2287/;A2 4,225195, ,+,2287/;A3 4,225196, ,,2288/;B3 <header>;a1a2a3 <header>;b1b2b3 <header>;c1c2c3 No fragment? c: first fragment of a line +: all following fragments : no fragment No fragment? No fragment? 40
42 411 printk fragmentation problem approach(2) Our apporach (2) Change the meaning of "fragment flag" If a message is fragmented, add 'f' flag. If a message has ' n', don't add any flag. (i.e. '') Do not use 'c'/'+' flag. Current ABI is changed, but users can automatically connect fragmented messages by using new fragment flag. Result by applying our approach (1) and (2) 6,8219, ,f,538/;B1 6,8220, ,f,539/;C1 4,8221, ,f,539/;C2 4,8222, ,,539/;C3 4,8223, ,f,538/;B2 6,8224, ,f,537/;A1 4,8225, ,,538/;B3 4,8226, ,,537/;A2A3 fragmented still fragmented The end of the fragmented messages 41
43 412 printk fragmentation problem current status Current patch Any comments are welcome! [RFC PATCH 0/2] printk: Add context information to kernel messages from /dev/kmsg 42
44 5 Summary We are doing community activities for realizing Linux which satisfies RAS requirements for missioncritical systems. Bug fixing (avoid the deadlock on Kdump) Add features (tunable serial RX trigger, tunable saved_cmdlines, and fragmented printk support) These activities can be used for not only missioncritical systems but also other systems. For example, fragmented printk is a big problem for a support division of system integrators. 43
45 Any questions? 44
46
47 Legal statements Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners. 46
RAS Enhancement Activities for Mission-Critical Linux Systems
RAS Enhancement Activities for MissionCritical Linux Systems Hitachi Ltd. Yoshihiro YUNOMAE 01 MissionCritical Systems We apply Linux to missioncritical systems. Banking systems/carrier backend systems/train
More informationSeiji Aguchi. Development Status of Troubleshooting Features, Tracing, Message Logging in Linux Kernel 5/20/2014
Development Status of Troubleshooting Features, Tracing, Message Logging in Linux Kernel 5/20/2014 Seiji Aguchi Information & Telecommunication Systems Company IT Platform Division Group, IT Platform R&D
More informationAnalyzing Kernel Behavior by SystemTap
Analyzing Kernel Behavior by SystemTap Kernel Tracer Approach 2009/2/25 Hitachi, Ltd., Software Division Noboru Obata ( ) Hitachi, Ltd. 2009. All rights reserved. Contents 1. Improving RAS Features for
More informationSystemTap for Enterprise
SystemTap for Enterprise SystemTap for Enterprise Enterprise Features in SystemTap 2010/09/28 Hitachi Systems Development Laboratory Linux Technology Center Masami Hiramatsu SystemTap Overview Tracing
More informationAdding Inter-event Capabilities to the Linux Trace Event Subsystem
Adding Inter-event Capabilities to the Linux Trace Event Subsystem Tom Zanussi Intel Open Source Technology Center Safety Critical Systems ELC 2017, Feb 22 1 Trace Events Background Latency Example Design
More informationMaintaining Linux Long Term & Adding Specific Features in Telecom Systems. Keika Kobayashi NEC Communication Systems Sep 29, Japan2010
Maintaining Linux Long Term & Adding Specific Features in Telecom Systems Keika Kobayashi NEC Communication Systems Sep 29, 2010@LinuxCon Japan2010 OUTLINE 1. Background 2. What we did 1. Keep kernel stable.
More informationDebugging Kernel without Debugger
Debugging Kernel without Debugger Masami Hiramatsu Software Platform Research Dept. Yokohama Research Lab. Hitachi Ltd., 1 Who am I? Masami Hiramatsu Researcher in Hitachi
More informationEvaluation of Real-time Performance in Embedded Linux. Hiraku Toyooka, Hitachi. LinuxCon Europe Hitachi, Ltd All rights reserved.
Evaluation of Real-time Performance in Embedded Linux LinuxCon Europe 2014 Hiraku Toyooka, Hitachi 1 whoami Hiraku Toyooka Software engineer at Hitachi " Working on operating systems Linux (mainly) for
More informationTesting real-time Linux: What to test and how.
Testing real-time Linux: What to test and how. Sripathi Kodi sripathik@in.ibm.com Agenda IBM Linux Technology Center What is a real-time Operating System? Enterprise real-time Real-Time patches for Linux
More information2006/7/22. NTT Data Intellilink Corporation Fernando Luis Vázquez Cao. Copyright(C)2006 NTT Data Intellilink Corporation
Evaluating Linux Kernel Crash Dumping Mechanisms 2006/7/22 NTT Data Intellilink Corporation Fernando Luis Vázquez Cao 1 Who am I? LKDTT (Linux Kernel Dump Test Tool) maintainer MKDump (Mini Kernel Dump)
More informationNo Crash Dump? No Problem! Light-weight remote kernel crash reporting for settop boxes
No Crash Dump? No Problem! Light-weight remote kernel crash reporting for settop boxes David VomLehn, Technical Leader CELF 2010 Imagine It's the last five minutes of the Superbowl... The game is tied...
More informationVerification & Validation of Open Source
Verification & Validation of Open Source 2011 WORKSHOP ON SPACECRAFT FLIGHT SOFTWARE Gordon Uchenick Coverity, Inc Open Source is Ubiquitous Most commercial and proprietary software systems have some open
More informationLow-Overhead Ring-Buffer of Kernel Tracing in a Virtualization System
Low-Overhead Ring-Buffer of Kernel Tracing in a Virtualization System Yoshihiro Yunomae Linux Technology Center Yokohama Research Lab. Hitachi, Ltd. 1 Introducing 1. Purpose of a low-overhead ring-buffer
More informationRAS and Memory Error Reporting with perf. Robert Richter 2nd CERN Advanced Performance Tuning workshop November 21, 2013
RAS and Memory Error Reporting with perf Robert Richter 2nd CERN Advanced Performance Tuning workshop November 21, 2013 Group photograph at Linaro Connect in Copenhagen Monday
More informationkdump: usage and internals
kdump: usage and internals CFP, #LinuxCon, Beijing, June 19-20, 2017 (panand@redhat.com) Agenda kdump from user perspective Kernel system calls When Kernel crashes vmcore structure makedumpfile kdump:
More informationOperating Systems (234123) Spring 2017 (Homework Wet 1) Homework 1 Wet
Homework 1 Wet Due Date: 30/4/2017 23:00 Teaching assistant in charge: Yehonatan Buchnik Important: the Q&A for the exercise will take place at a public forum Piazza only. Critical updates about the HW
More informationIntro to Segmentation Fault Handling in Linux. By Khanh Ngo-Duy
Intro to Segmentation Fault Handling in Linux By Khanh Ngo-Duy Khanhnd@elarion.com Seminar What is Segmentation Fault (Segfault) Examples and Screenshots Tips to get Segfault information What is Segmentation
More informationUnderstanding Real Time Linux. Alex Shi
Understanding Real Time Linux Alex Shi Agenda What s real time OS RTL project status RT testing and tracing Reasons of latency and solutions for them Resources Summary What s real time OS Real time and
More informationCS2506 Quick Revision
CS2506 Quick Revision OS Structure / Layer Kernel Structure Enter Kernel / Trap Instruction Classification of OS Process Definition Process Context Operations Process Management Child Process Thread Process
More informationLinuxCon North America 2016 Investigating System Performance for DevOps Using Kernel Tracing
Investigating System Performance for DevOps Using Kernel Tracing jeremie.galarneau@efficios.com @LeGalarneau Presenter Jérémie Galarneau EfficiOS Inc. Head of Support http://www.efficios.com Maintainer
More informationSystem Wide Tracing User Need
System Wide Tracing User Need dominique toupin ericsson com April 2010 About me Developer Tool Manager at Ericsson, helping Ericsson sites to develop better software efficiently Background
More informationThe Ephemeral Smoking Gun
The Ephemeral Smoking Gun Using ftrace and kgdb to resolve a pthread deadlock LabVIEW Real-Time National Instruments The Setup Customer application crashed after a few hours The clincher: new issue from
More informationImproving Linux development with better tools
Improving Linux development with better tools Andi Kleen Oct 2013 Intel Corporation ak@linux.intel.com Linux complexity growing Source lines in Linux kernel All source code 16.5 16 15.5 M-LOC 15 14.5 14
More informationDecoding Those Inscrutable RCU CPU Stall Warnings
Paul E. McKenney, IBM Distinguished Engineer, Linux Technology Center Member, IBM Academy of Technology Open Source Summit North America, September 12, 2017 Decoding Those Inscrutable RCU CPU Stall Warnings
More informationMarch 10, Linux Live Patching. Adrien schischi Schildknecht. Why? Who? How? When? (consistency model) Conclusion
March 10, 2015 Section 1 Why Goal: apply a binary patch to kernel on-line. is done without shutdown quick response to a small but critical issue the goal is not to avoid downtime Limitations: simple changes
More informationHow to get realistic C-states latency and residency? Vincent Guittot
How to get realistic C-states latency and residency? Vincent Guittot Agenda Overview Exit latency Enter latency Residency Conclusion Overview Overview PMWG uses hikey960 for testing our dev on b/l system
More informationInferring Temporal Behaviours Through Kernel Tracing
Inferring Temporal Behaviours Through Kernel Tracing Paolo Rallo, Nicola Manica, Luca Abeni University of Trento Trento - Italy prallo@gmail.com, nicola.manica@disi.unitn.it, luca.abeni@unitn.it Technical
More informationImproving Linux Development with better tools. Andi Kleen. Oct 2013 Intel Corporation
Improving Linux Development with better tools Andi Kleen Oct 2013 Intel Corporation ak@linux.intel.com Linux complexity growing Source lines in Linux kernel All source code 16.5 16 15.5 M-LOC 15 14.5 14
More informationAdventures In Real-Time Performance Tuning, Part 2
Adventures In Real-Time Performance Tuning, Part 2 The real-time for Linux patchset does not guarantee adequate real-time behavior for all target platforms. When using real-time Linux on a new platform
More informationKernel Internals. Course Duration: 5 days. Pre-Requisites : Course Objective: Course Outline
Course Duration: 5 days Pre-Requisites : Good C programming skills. Required knowledge Linux as a User Course Objective: To get Kernel and User Space of Linux and related programming Linux Advance Programming
More informationDecoding Those Inscrutable RCU CPU Stall Warnings
Paul E. McKenney, IBM Distinguished Engineer, Linux Technology Center Member, IBM Academy of Technology linux.conf.au Kernel Miniconf, January 22, 2018 Decoding Those Inscrutable RCU CPU Stall Warnings
More informationOverhead Evaluation about Kprobes and Djprobe (Direct Jump Probe)
Overhead Evaluation about Kprobes and Djprobe (Direct Jump Probe) Masami Hiramatsu Hitachi, Ltd., SDL Jul. 13. 25 1. Abstract To implement flight recorder system, the overhead
More informationFtrace - What s new. Since my last explanation of ftrace (from v3.18) Steven Rostedt 25/10/ VMware Inc. All rights reserved.
Ftrace - What s new Since my last explanation of ftrace (from v3.18) Steven Rostedt 25/10/2017 2017 VMware Inc. All rights reserved. What ftrace did (and still does) Function tracing Function graph tracing
More informationProposal of Live Dump
Proposal of Live Dump YOSHIDA Masanori Yokohama Research Laboratory, Hitachi LinuxCon Japan '12 1 Agenda 1.What is Live Dump? 2.Implementation 3.Future work 2 1.What is Live Dump? 2.Implementation 3.Future
More informationI/O Management Software. Chapter 5
I/O Management Software Chapter 5 1 Learning Outcomes An understanding of the structure of I/O related software, including interrupt handers. An appreciation of the issues surrounding long running interrupt
More informationApplying User-level Drivers on
Applying User-level Drivers on DTV System Gunho Lee, Senior Research Engineer, ELC, April 18, 2007 Content Background Requirements of DTV Device Drivers Design of LG DTV User-level Drivers Implementation
More informationThe OS and Multitasking: An Example
The OS and Multitasking: An Example ENEE 446: Digital Computer Design, Spring 2006 Prof. Bruce Jacob The diagram to the right illustrates the simplistic view of what goes on in a typical UTIL UTIL system.
More informationApplication Fault Tolerance Using Continuous Checkpoint/Restart
Application Fault Tolerance Using Continuous Checkpoint/Restart Tomoki Sekiyama Linux Technology Center Yokohama Research Laboratory Hitachi Ltd. Outline 1. Overview of Application Fault Tolerance and
More informationMemory Management. Disclaimer: some slides are adopted from book authors slides with permission 1
Memory Management Disclaimer: some slides are adopted from book authors slides with permission 1 CPU management Roadmap Process, thread, synchronization, scheduling Memory management Virtual memory Disk
More informationHardware Latencies How to flush them out (A use case) Steven Rostedt Red Hat
Hardware Latencies How to flush them out (A use case) Steven Rostedt Red Hat Here s a story, of a lovely lady... No this isn t the Brady Bunch Nor is it about a lovely lady But it probably could have been
More informationCSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware
CSE 120 July 27, 2006 Day 8 Input/Output Instructor: Neil Rhodes How hardware works Operating Systems Layer What the kernel does API What the programmer does Overview 2 Kinds Block devices: read/write
More informationThe Note/1 Driver Design
Nathan Lay Kelly Hirai 6/14/06 Device Drivers The Note/1 Driver Design Introduction The Music Quest Note/1 midi engine is a small midi controller that communicates over the parallel port. It features two
More informationAppendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc.
Appendix A GLOSSARY SYS-ED/ Computer Education Techniques, Inc. $# Number of arguments passed to a script. $@ Holds the arguments; unlike $* it has the capability for separating the arguments. $* Holds
More informationThe control of I/O devices is a major concern for OS designers
Lecture Overview I/O devices I/O hardware Interrupts Direct memory access Device dimensions Device drivers Kernel I/O subsystem Operating Systems - June 26, 2001 I/O Device Issues The control of I/O devices
More informationDRONE SITL BRINGUP WITH THE IIO FRAMEWORK
DRONE SITL BRINGUP WITH THE IIO FRAMEWORK Bandan Das Open Source Summit, Europe, 2018 1. 1 WHAT'S THIS ABOUT? My experiments with bringing up sensors on a x86 board Understanding the IIO
More informationValidating Core Parallel Software
Paul E. McKenney, IBM Distinguished Engineer, Linux Technology Center linux.conf.au January 29, 2013 Validating Core Parallel Software linux.conf.au Overview Avoiding Bugs The Open-Source Way Avoiding
More informationPyTimechart practical. Pierre Tardy Software Engineer - UMG October 2011
PyTimechart practical Pierre Tardy Software Engineer - UMG October 2011 Intel Employee since 2009 Working on Intel s phone platforms Meego Android Power Management Tools (pytimechart, buildbot) Open-Source
More informationAn Interrupt is either a Hardware generated CALL (externally derived from a hardware signal)
An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from the execution of an instruction or by some other internal
More informationAn Interrupt is either a Hardware generated CALL (externally derived from a hardware signal)
An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from the execution of an instruction or by some other internal
More informationPostmortem Debugging with Coresight HKG18-TR14. Leo Yan, Linaro Support and Solutions Engineering
Postmortem Debugging with Coresight HKG18-TR14 Leo Yan, Linaro Support and Solutions Engineering Introduction This session discusses postmortem debugging techniques in the Linux kernel. Firstly we will
More informationOperating System System Call & Debugging Technique
1 Operating System System Call & Debugging Technique 진주영 jjysienna@gmail.com System Call 2 A way for user-space programs to interact with the kernel System Call enables application programs in user-mode
More informationKeeping Up With The Linux Kernel. Marc Dionne AFS and Kerberos Workshop Pittsburgh
Keeping Up With The Linux Kernel Marc Dionne AFS and Kerberos Workshop Pittsburgh - 2015 The stage Linux is widely deployed as an AFS client platform OpenAFS client available in popular distributions Ubuntu,
More informationUsing kgdb and the kgdb Internals
Using kgdb and the kgdb Internals Jason Wessel jason.wessel@windriver.com Tom Rini trini@kernel.crashing.org Amit S. Kale amitkale@linsyssoft.com Using kgdb and the kgdb Internals by Jason Wessel by Tom
More informationReal Time Linux patches: history and usage
Real Time Linux patches: history and usage Presentation first given at: FOSDEM 2006 Embedded Development Room See www.fosdem.org Klaas van Gend Field Application Engineer for Europe Why Linux in Real-Time
More informationConfiguring attack detection and prevention 1
Contents Configuring attack detection and prevention 1 Overview 1 Attacks that the device can prevent 1 Single-packet attacks 1 Scanning attacks 2 Flood attacks 3 TCP fragment attack 4 Login DoS attack
More informationEECS 3221 Operating System Fundamentals
EECS 3221 Operating System Fundamentals Instructor: Prof. Hui Jiang Email: hj@cse.yorku.ca Web: http://www.eecs.yorku.ca/course/3221 General Info 3 lecture hours each week 2 assignments (2*5%=10%) 1 project
More informationEECS 3221 Operating System Fundamentals
General Info EECS 3221 Operating System Fundamentals Instructor: Prof. Hui Jiang Email: hj@cse.yorku.ca Web: http://www.eecs.yorku.ca/course/3221 3 lecture hours each week 2 assignments (2*5%=10%) 1 project
More informationCS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2003 Lecture 21: Network Protocols (and 2 Phase Commit) 21.0 Main Point Protocol: agreement between two parties as to
More informationScalability Efforts for Kprobes
LinuxCon Japan 2014 (2014/5/22) Scalability Efforts for Kprobes or: How I Learned to Stop Worrying and Love a Massive Number of Kprobes Masami Hiramatsu Linux Technology
More informationThe State of Kernel Debugging Technology. Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer
The State of Kernel Debugging Technology Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer August 12 th, 2010 Agenda Brief history of kernel.org kernel debuggers
More information20-EECE-4029 Operating Systems Fall, 2015 John Franco
20-EECE-4029 Operating Systems Fall, 2015 John Franco Final Exam name: Question 1: Processes and Threads (12.5) long count = 0, result = 0; pthread_mutex_t mutex; pthread_cond_t cond; void *P1(void *t)
More informationUser Space Tracing in Small Footprint Devices. (How Low can You Go?)
User Space Tracing in Small Footprint Devices (How Low can You Go?) Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer August 18 th, 2011 Agenda What is UST? How
More informationBuffer Management for XFS in Linux. William J. Earl SGI
Buffer Management for XFS in Linux William J. Earl SGI XFS Requirements for a Buffer Cache Delayed allocation of disk space for cached writes supports high write performance Delayed allocation main memory
More informationMemory Management. To improve CPU utilization in a multiprogramming environment we need multiple programs in main memory at the same time.
Memory Management To improve CPU utilization in a multiprogramming environment we need multiple programs in main memory at the same time. Basic CPUs and Physical Memory CPU cache Physical memory
More informationFtrace Profiling. Presenter: Steven Rostedt Red Hat
Ftrace Profiling Presenter: Steven Rostedt rostedt@goodmis.org Red Hat What do you want to profile? Application Cache misses Memory locality Page faults Finding bad algorithms O(n^2) CPU cycles I/O usage
More informationCSCE Introduction to Computer Systems Spring 2019
CSCE 313-200 Introduction to Computer Systems Spring 2019 Processes Dmitri Loguinov Texas A&M University January 24, 2019 1 Chapter 3: Roadmap 3.1 What is a process? 3.2 Process states 3.3 Process description
More informationVirtual File System -Uniform interface for the OS to see different file systems.
Virtual File System -Uniform interface for the OS to see different file systems. Temporary File Systems -Disks built in volatile storage NFS -file system addressed over network File Allocation -Contiguous
More informationLinux Device Drivers Interrupt Requests
Overview 1 2 3 Installation of an interrupt handler Interface /proc 4 5 6 7 primitive devices can be managed only with I/O regions, most devices require a more complicated approach, devices cooperate with
More informationChe-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University
Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage
More informationDebugging uclinux on Coldfire
Debugging uclinux on Coldfire By David Braendler davidb@emsea-systems.com What is uclinux? uclinux is a version of Linux for CPUs without virtual memory or an MMU (Memory Management Unit) and is typically
More informationI/O Management Software. Chapter 5
I/O Management Software Chapter 5 1 Learning Outcomes An understanding of the structure of I/O related software, including interrupt handers. An appreciation of the issues surrounding long running interrupt
More informationECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017
ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 The Operating System (OS) Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke)
More informationOutline. Operating Systems: Devices and I/O p. 1/18
Outline Diversity of I/O devices block and character devices Organization of I/O subsystem of kernel device drivers Common hardware characteristics of device I/O subsystem tasks Operating Systems: Devices
More informationOperating Systems Design Exam 2 Review: Spring 2011
Operating Systems Design Exam 2 Review: Spring 2011 Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 CPU utilization tends to be lower when: a. There are more processes in memory. b. There are fewer processes
More informationChapter 10: Mass-Storage Systems
Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne 2013 Chapter 10: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space
More informationLive Patching: The long road from Kernel to User Space. João Moreira Toolchain Engineer - SUSE Labs
Live Patching: The long road from Kernel to User Space João Moreira Toolchain Engineer - SUSE Labs jmoreira@suse.de Software has bugs, and bugs have to be fixed + security issues + execution degradation
More informationCS 416: Opera-ng Systems Design March 23, 2012
Question 1 Operating Systems Design Exam 2 Review: Spring 2011 Paul Krzyzanowski pxk@cs.rutgers.edu CPU utilization tends to be lower when: a. There are more processes in memory. b. There are fewer processes
More informationChapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition
Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne 2013 Chapter 10: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space
More informationMARUTHI SCHOOL OF BANKING (MSB)
MARUTHI SCHOOL OF BANKING (MSB) SO IT - OPERATING SYSTEM(2017) 1. is mainly responsible for allocating the resources as per process requirement? 1.RAM 2.Compiler 3.Operating Systems 4.Software 2.Which
More informationCSE 120 PRACTICE FINAL EXAM, WINTER 2013
CSE 120 PRACTICE FINAL EXAM, WINTER 2013 For each question, select the best choice. In the space provided below each question, justify your choice by providing a succinct (one sentence) explanation. 1.
More informationThe Kernel Report. (Plumbers 2010 edition) Jonathan Corbet LWN.net
The Kernel Report (Plumbers 2010 edition) Jonathan Corbet LWN.net corbet@lwn.net Yeah, yeah, maybe you're waiting for flower power and free sex. Good for you. But if you are, don't ask the Linux kernel
More informationESE 333 Real-Time Operating Systems 163 Review Deadlocks (Cont.) ffl Methods for handling deadlocks 3. Deadlock prevention Negating one of four condit
Review Deadlocks ffl Non-sharable resources ffl Necessary conditions for a deadlock to occur 1. Mutual exclusion 2. Hold and wait 3. No preemption 4. Circular wait ffl Resource graph ffl Use resource graph
More informationAddress spaces and memory management
Address spaces and memory management Review of processes Process = one or more threads in an address space Thread = stream of executing instructions Address space = memory space used by threads Address
More informationSistemi in Tempo Reale
Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Giuseppe Lipari Introduzione alla concorrenza Fundamentals Algorithm: It is the logical procedure to solve a certain problem It
More informationConfiguring attack detection and prevention 1
Contents Configuring attack detection and prevention 1 Overview 1 Attacks that the device can prevent 1 Single-packet attacks 1 Scanning attacks 2 Flood attacks 3 TCP fragment attack 4 Login DoS attack
More informationMotivation. Operating Systems. File Systems. Outline. Files: The User s Point of View. File System Concepts. Solution? Files!
Motivation Operating Systems Process store, retrieve information Process capacity restricted to vmem size When process terminates, memory lost Multiple processes share information Systems (Ch 0.-0.4, Ch.-.5)
More informationCS5460/6460: Operating Systems. Lecture 24: Device drivers. Anton Burtsev April, 2014
CS5460/6460: Operating Systems Lecture 24: Device drivers Anton Burtsev April, 2014 Device drivers Conceptually Implement interface to hardware Expose some high-level interface to the kernel or applications
More informationEzBench, a tool to help you benchmark and bisect the Graphics Stack s performance
EzBench, a tool to help you benchmark and bisect the Graphics Stack s performance Martin Peres Intel Open Source Technology Center Finland September 23, 2016 Summary 1 Introduction 2 Graphics Continuous
More informationDriver Tracing Interface
David J Wilder IBM Linux Technology Center dwilder@usibmcom Driver Tracing Interface Thomas R Zanussi IBM Linux Technology Center zanussi@usibmcom Michael Holzheu IBM Linux on zseries Development holzheu@deibmcom
More informationCS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University
CS 370: SYSTEM ARCHITECTURE & SOFTWARE [MASS STORAGE] Frequently asked questions from the previous class survey Shrideep Pallickara Computer Science Colorado State University L29.1 L29.2 Topics covered
More informationECE 650 Systems Programming & Engineering. Spring 2018
ECE 650 Systems Programming & Engineering Spring 2018 Networking Transport Layer Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) TCP/IP Model 2 Transport Layer Problem solved:
More informationVirtual switching technologies and Linux bridge
Virtual switching technologies and Linux bridge Toshiaki Makita NTT Open Source Software Center Today's topics Virtual switching technologies in Linux Software switches (bridges) in Linux Switching technologies
More informationLinux Kernel Exploitation. Where no user has gone before
Linux Kernel Exploitation Where no user has gone before Overview Background The Vulnerabilities The Plans The Exploits Lessons Questions Background A kernel is: the main OS program to run after boot a
More informationCSE 4/521 Introduction to Operating Systems. Lecture 24 I/O Systems (Overview, Application I/O Interface, Kernel I/O Subsystem) Summer 2018
CSE 4/521 Introduction to Operating Systems Lecture 24 I/O Systems (Overview, Application I/O Interface, Kernel I/O Subsystem) Summer 2018 Overview Objective: Explore the structure of an operating system
More informationValidating Core Parallel Software
Paul E. McKenney, IBM Distinguished Engineer, Linux Technology Center 28 October 2011 Validating Core Parallel Software Overview Who is Paul and How Did He Get This Way? Avoiding Debugging By Design Avoiding
More informationCPU Scheduling. CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections )
CPU Scheduling CSE 2431: Introduction to Operating Systems Reading: Chapter 6, [OSC] (except Sections 6.7.2 6.8) 1 Contents Why Scheduling? Basic Concepts of Scheduling Scheduling Criteria A Basic Scheduling
More informationCEC 450 Real-Time Systems
CEC 450 Real-Time Systems Lecture 6 Accounting for I/O Latency September 28, 2015 Sam Siewert A Service Release and Response C i WCET Input/Output Latency Interference Time Response Time = Time Actuation
More informationGroking the Linux SPI Subsystem FOSDEM Matt Porter
Groking the Linux SPI Subsystem FOSDEM 2017 Matt Porter Obligatory geek reference deobfuscation grok (/gräk/) verb to understand intuitively or by empathy, to establish rapport with. Overview What is SPI?
More informationVMware vrealize operations Management Pack FOR. PostgreSQL. User Guide
VMware vrealize operations Management Pack FOR PostgreSQL User Guide TABLE OF CONTENTS 1. Purpose... 3 2. Introduction to the Management Pack... 3 2.1 How the Management Pack Collects Data... 3 2.2 Data
More informationThe Device Driver Interface. Input/Output Devices. System Call Interface. Device Management Organization
Input/Output s Slide 5-1 The Driver Interface Slide 5-2 write(); Interface Output Terminal Terminal Printer Printer Disk Disk Input or Terminal Terminal Printer Printer Disk Disk Management Organization
More information