lkml.org 
[lkml]   [2013]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 1/6] kernel: implement queue spinlock API
From
On Thu, Feb 7, 2013 at 9:03 PM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
> Right... For spinlocks that -don't- disable irqs, you need to deal with
> the possibility that a CPU gets interrupted while spinning, and the
> interrupt handler also tries to acquire a queued lock. One way to deal
> with this is to have a node per CPUxirq. Of course, if interrupts
> handlers always disable irqs when acquiring a spinlock, then you only
> need CPUx2.

The simple solution would be to do like I proposed in my faster queue
spinlock proposal, have one function for process context lock
acquisitions, another for bh-disabled acquisitions, and just say that
hardirqs can't use the queue spinlocks (I don't expect we have any
locks taken from hardirq context where contention might be an issue ?)

--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.


\
 
 \ /
  Last update: 2013-02-08 06:21    [W:0.096 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site