On Fri, 21 Oct 2005, Ingo Molnar wrote: > > the unlock is simple even in the preemption case No it's not. It needs to decrement the preemption counter and test it. See kernel/spinlock.c: void __lockfunc _spin_unlock(spinlock_t *lock) { _raw_spin_unlock(lock); preempt_enable(); } EXPORT_SYMBOL(_spin_unlock); and look at what "preempt_enable()" does. In other words, with CONFIG_PREEMPT, your patch is WRONG. You made "spin_unlock()" just skip the preempt_enable. In fact, with preemption, the _locking_ is the simpler part. Unlock is the complex one. Linus - 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:
- 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]>
- Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
- From: Ingo Molnar <[email protected]>
- i386 spinlock fairness: bizarre test results
- Prev by Date: Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards.
- Next by Date: Re: 2.6.13.4: 'find' complained about sysfs
- 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):