8 * User space memory access
13 * May race with a process
14 * Usually blocks all other interrupts
17 # Bottom Halves: the old way
19 * Interrupts would work in the top halves and schedule a bottom half for
21 * Bottom halves executed with interrupts enabled
22 * They were static: drivers could not dynamically create them
23 * Only one bottom half could execute at a time, even in SMP systems
25 # Softirqs: scaling Linux
27 * They were introduced to put the IRQ handling to scale
28 * They are static as well, but two of the softirqs are dedicated to tasklets
29 * Tasklets allow drivers to schedule some code for execution dynamically
33 * There are many places in the code that will wait for an event
34 * Waiting should release the processor to another process: that means that the
35 current process (the waiter) will sleep
36 * Sleep is equivalent to scheduling, that is, picking up another process to
38 * Scheduling another process is prone to races
42 * Contexts that cannot sleep or schedule
43 * IRQs and softirqs are atomic
44 * They cannot access user space
49 * High priority tasklets
55 * Low priority tasklets
57 * High Resolution Timers
64 * Scalable locking is needed
65 * SMP-safety is what people are selling and buying
66 * Only local IRQs are disabled
70 * Now, a single CPU may race with itself
71 * Different problems, different care and approach
72 * Some problems are the same and SMP-safety is now relevant in UP systems
76 * local\\_irq\\_disable
77 * local\\_irq\\_enable
79 * local\\_irq\\_restore
81 # Disabling Preemption
85 * preempt\\_enable\\_no\\_resched
89 * smp\\_processor\\_id