Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits

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

 



* Linus Torvalds <[email protected]> wrote:

> On Thu, 20 Oct 2005, Ingo Molnar wrote:
> >
> > +/*
> > + * We inline the unlock functions in the nondebug case:
> > + */
> > +#ifdef CONFIG_DEBUG_SPINLOCK
> 
> That can't be right. What about preemption etc?
> 
> There's a lot more to spin_unlock() than just the debugging stuff.

the unlock is simple even in the preemption case - it's the _lock that 
gets complicated there. Once there's some attachment to the unlock 
operation (irq restore, or bh enabling) it again makes sense to keep 
things uninlined, but for the specific case of the simple-unlocks, it's 
a 0.2% space win to not inline - mostly from reduced clobbering of %eax, 
%ecx, %edx. Should be less of a win on 64-bit CPUs with enough 
registers.

	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