User Tools

Site Tools


mywiki:linux:linux_kernel_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
mywiki:linux:linux_kernel_notes [2015/04/02 15:03] – created shaoguohmywiki:linux:linux_kernel_notes [2019/09/15 18:55] (current) – external edit 127.0.0.1
Line 1: Line 1:
- IRQ Handler A IRQ Handler B Softirq A Softirq B Tasklet A | Tasklet B | Timer A | Timer B | User Context User Context B +[[http://www.linux-mips.org/wiki/Linux/MIPS_Porting_Guide|MIPS Porting Guide]] | 
-IRQ Handler | None +===== Kernel Context knowledge =====  
-IRQ Handler B spin_lock_irqsave() | None +process context includes user context, kernel thread, work queue | 
-Softirq A spin_lock_irq() spin_lock_irq() spin_lock()                +| User Context | The kernel executing on behalf of a particular process (ie. a system call or trap, ioctl, module_init, module_exit or kernel thread, workqueue. You can tell which process with the current macro.) Not to be confused with userspace. Can be interrupted by software or hardware interrupts. 
-Softirq B spin_lock_irq() spin_lock_irq() spin_lock() spin_lock()              +Userspace (not kernel) | process executing its own code outside the kernel 
-Tasklet A spin_lock_irq() spin_lock_irq() spin_lock() spin_lock() None            +Interrupt context | includes hard irq, kernel timer, softirq, tasklet if in_interrupt() true 
-Tasklet B spin_lock_irq() spin_lock_irq() spin_lock() spin_lock() spin_lock() None          +| Hardware IRQ | Hardware interrupt request | if in_irq() true | 
-Timer spin_lock_irq() spin_lock_irq() spin_lock() spin_lock() spin_lock() spin_lock() None        +Softirq | Software interrupt handler. in_irq() returns false; in_softirq() returns true. Tasklets and softirqs both fall into the category of 'software interrupts'. Strictly speaking a softirq is one of up to 32 enumerated software interrupts which can run on multiple CPUs at once. Sometimes used to refer to tasklets as well (ie. all software interrupts). | if in_irq() false and in_softirq() true | 
-Timer B spin_lock_irq() spin_lock_irq() spin_lock() spin_lock() spin_lock() spin_lock() spin_lock() None      +Tasklet dynamically-registered software interrupt, which is guaranteed to only run on one CPU at a time | 
-User Context A spin_lock_irq() spin_lock_irq() spin_lock_bh() spin_lock_bh() spin_lock_bh() spin_lock_bh() spin_lock_bh() spin_lock_bh() None    +Timer | which is running at (or close toa given time. When running, it is just like a tasklet (in fact, they are called from the TIMER_SOFTIRQ). | 
-User Context B spin_lock_irq() spin_lock_irq() spin_lock_bh() spin_lock_bh() spin_lock_bh() spin_lock_bh() spin_lock_bh() spin_lock_bh() down_interruptible None +
  
mywiki/linux/linux_kernel_notes.1427958223.txt.gz · Last modified: (external edit)