lkml.org 
[lkml]   [2005]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits

* Linus Torvalds <torvalds@osdl.org> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-21 00:04    [W:0.049 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site