On Tue, 1 Apr 2008, Jiri Kosina wrote:i.e. is there any particular reason why we don't have something like the patch below (implemented for all the lock variants of course, this is just to demonstrate what I mean)? spinlocks: inline spin_lock() in non-debug cases inline spin_lock() in the non-debug case. Signed-off-by: Jiri Kosina <jkosina@suse.cz> diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 576a5f7..30922ba 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -178,7 +178,12 @@ do { \ #define read_trylock(lock) __cond_lock(lock, _read_trylock(lock)) #define write_trylock(lock) __cond_lock(lock, _write_trylock(lock)) +#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || \ + !defined(CONFIG_SMP) #define spin_lock(lock) _spin_lock(lock) +#else +#define spin_lock(lock) \ + do { __raw_spin_lock(&(lock)->raw_lock); __acquire(lock); } while (0) #ifdef CONFIG_DEBUG_LOCK_ALLOC # define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) --
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Peter Zijlstra | [PATCH 6/6] sched: disabled rt-bandwidth by default |
| Tejun Heo | [PATCHSET] CUSE: implement CUSE |
| Richard Jonsson | forcedeth: MAC-address reversed on resume from suspend |
git: | |
| Junio C Hamano | [0/4] What's not in 1.5.2 (overview) |
| Jan Hudec | Smart fetch via HTTP? |
| Johannes Schindelin | Re: git log filtering |
| Junio C Hamano | [PATCH] combine-diff: reuse diff from the same blob. |
| Julien TOUCHE | setting up ssh tunnel/vpn |
| Jordi Prats | OpenBSD with pf on a mini-ITX? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Reyk Floeter | Re: hoststated(8): DNS Relay uses unexpected source IP address |
| David Miller | Re: [ANNOUNCE] Btrfs v0.12 released |
| Christophe Saout | Re: silent semantic changes with reiser4 |
| Anton Altaparmakov | Re: [RFC] add FIEMAP ioctl to efficiently map file allocation |
| Rik van Riel | Re: [RFD] Incremental fsck |
