Re: [rfc][patch 2/2] x86_64: FIFO ticket spinlocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Nick Piggin <[email protected]> wrote:

> On Mon, Jul 16, 2007 at 11:26:46AM +0200, Ingo Molnar wrote:
> > 
> > * Nick Piggin <[email protected]> wrote:
> > 
> > > [...] trylock is more significantly slower, but they are relatively 
> > > rare.
> > 
> > trylock is the main thing that the spinlock debugging code uses, and 
> > SPINLOCK_DEBUG is frequently enabled by distro kernels. OTOH, the cost 
> > looks like to be +5 instructions, right? Still ...
> 
> Which trylocks do you mean? The lockbreak spinlocks use trylock, but 
> those are not used with the ticket version.

the trylocks in lib/spinlock-debug.c:

 static void __spin_lock_debug(spinlock_t *lock)
 {
 ...
                         if (__raw_spin_trylock(&lock->raw_lock))
                                 return;
 ...
 void _raw_spin_lock(spinlock_t *lock)
 {
         debug_spin_lock_before(lock);
         if (unlikely(!__raw_spin_trylock(&lock->raw_lock)))
                 __spin_lock_debug(lock);
         debug_spin_lock_after(lock);
 }

am i missing something?

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux