X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Documentation%2FDocBook%2Fkernel-locking.tmpl;h=90dc2de8e0afd995f5bc57217b29455707106a47;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=4fd97de055ca87a04d0ba59cba6c5231b0941d4d;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 4fd97de05..90dc2de8e 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl @@ -1,4 +1,6 @@ - + + @@ -236,12 +238,12 @@ your task will put itself on the queue, and be woken up when the semaphore is released. This means the CPU will do something else while you are waiting, but there are many cases when you - simply can't sleep (see ), and so + simply can't sleep (see ), and so have to use a spinlock instead. Neither type of lock is recursive: see - . + . @@ -326,7 +328,7 @@ Note that you can also use spin_lock_irq() or spin_lock_irqsave() here, which stop - hardware interrupts as well: see . + hardware interrupts as well: see . @@ -403,7 +405,7 @@ The same softirq can run on the other CPUs: you can use a - per-CPU array (see ) for better + per-CPU array (see ) for better performance. If you're going so far as to use a softirq, you probably care about scalable performance enough to justify the extra complexity. @@ -545,120 +547,120 @@ Table of Locking Requirements - - - - -IRQ Handler A -IRQ Handler B -Softirq A -Softirq B -Tasklet A -Tasklet B -Timer A -Timer B -User Context A -User Context B - - - -IRQ Handler A -None - - - -IRQ Handler B -spin_lock_irqsave -None - - - -Softirq A -spin_lock_irq -spin_lock_irq -spin_lock - - - -Softirq B -spin_lock_irq -spin_lock_irq -spin_lock -spin_lock - - - -Tasklet A -spin_lock_irq -spin_lock_irq -spin_lock -spin_lock -None - - - -Tasklet B -spin_lock_irq -spin_lock_irq -spin_lock -spin_lock -spin_lock -None - - - -Timer A -spin_lock_irq -spin_lock_irq -spin_lock -spin_lock -spin_lock -spin_lock -None - - - -Timer B -spin_lock_irq -spin_lock_irq -spin_lock -spin_lock -spin_lock -spin_lock -spin_lock -None - - - -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 - - - -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 - - - - -
+ + + + +IRQ Handler A +IRQ Handler B +Softirq A +Softirq B +Tasklet A +Tasklet B +Timer A +Timer B +User Context A +User Context B + + + +IRQ Handler A +None + + + +IRQ Handler B +spin_lock_irqsave +None + + + +Softirq A +spin_lock_irq +spin_lock_irq +spin_lock + + + +Softirq B +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock + + + +Tasklet A +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +None + + + +Tasklet B +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +spin_lock +None + + + +Timer A +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +spin_lock +spin_lock +None + + + +Timer B +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +spin_lock +spin_lock +spin_lock +None + + + +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 + + + +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 + + + + +