|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [Patch] don't spin with irq disabled
On 26/03/2009 09:00, "Juergen Gross" <juergen.gross@xxxxxxxxxxxxxxxxxxx>
wrote:
> Attached patch reduces interrupt latency in lock handling.
> spin_lock_irq and spin_lock_irqsave used to turn off IRQs and then tried to
> get the lock. If the lock was already held, waiting for the lock was done with
> IRQs still off.
> The patch reenables IRQs during the wait loop.
>
> read/write locks seem to be rarely used, so I didn't change them.
>
> In favor for ia64 I chose not to modify the assembler code :-)
This will ping-pong the spinlock cache line when spinning among multiple
processors. Still, getting rid of _raw_spin_lock is an interesting idea, and
perhaps your scheme will work okay if modified as:
while (unlikely(!raw_spin_trylock))
while (likely(raw_spin_is_locked))
...;
I'll think about it -- certainly it would cull loads of crap from ia64's
spinlock.h. No need to send another patch.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
Re: [Xen-devel] [Patch] don't spin with irq disabled,
Keir Fraser <=
|
|
|
|
|