* 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/
- Follow-Ups:
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- References:
- i386 spinlock fairness: bizarre test results
- From: Chuck Ebbert <[email protected]>
- Re: i386 spinlock fairness: bizarre test results
- From: Alan Cox <[email protected]>
- Re: i386 spinlock fairness: bizarre test results
- From: Linus Torvalds <[email protected]>
- [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Eric Dumazet <[email protected]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Eric Dumazet <[email protected]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Andrew Morton <[email protected]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Ingo Molnar <[email protected]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Linus Torvalds <[email protected]>
- i386 spinlock fairness: bizarre test results
- Prev by Date: Re: [PATCH] added sysdev attribute to sysdev show/store methods - for linux-2.6.13.4
- Next by Date: Re: [PATCH] added sysdev attribute to sysdev show/store methods - for linux-2.6.13.4
- Previous by thread: Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- Next by thread: Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- Index(es):