lkml.org 
[lkml]   [1999]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: possible spinlock optimizations
Manfred wrote:
>
> I think there are 2 possible optimizations for spinlocks:
> 1) spin_lock_irq(): What about enabling interrupts while spinning?
> CPU1 owns the spinlock, ie it runs with disabled interrupts.
> Now CPU2 tries to acquire the spinlock, it fails and it starts to spin.
> - while spinning, there are no atomicity requirements.
> - it would improve the interrupt responsiveness. Currently, both CPU's are
> waiting/running with disabled interrupts.
> - the change only affects the "slow path", it doesn't slow down the normal
> case.

How do you atomically-acquire-the-lock-and-disable-interrupts
(I assume we are talking about x86 here) ?

Regards,
-velco

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.052 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site