Hi, On Thu, 15 Sep 2005, Nick Piggin wrote: > Roman: any ideas about what you would prefer? You'll notice > atomic_inc_not_zero replaces rcuref_inc_lf, which is used several times > in the VFS. In the larger picture I'm not completely happy with these scalibilty patches, as they add extra overhead at the lower end. On a UP system in general nothing beats: spin_lock(); if (*ptr) ptr += 1; spin_unlock(); The main problem is here that the atomic functions are used in two basic situation: 1) interrupt synchronization 2) multiprocessor synchronization The atomic functions have to assume both, but on UP systems it often is a lot cheaper if they don't have to synchronize with interrupts. So replacing a spinlock with a few atomic operations can hurt UP performance. bye, Roman - 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 2/5] atomic: introduce atomic_inc_not_zero
- From: Nick Piggin <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Dipankar Sarma <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: "David S. Miller" <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Andrew Morton <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- References:
- [PATCH 1/5] atomic: introduce atomic_cmpxchg
- From: Nick Piggin <[email protected]>
- [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Nick Piggin <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Roman Zippel <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Nick Piggin <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Roman Zippel <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Russell King <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Roman Zippel <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Russell King <[email protected]>
- Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- From: Nick Piggin <[email protected]>
- [PATCH 1/5] atomic: introduce atomic_cmpxchg
- Prev by Date: Re: NTP leap second question
- Next by Date: Re: 2.6.14-rc1-mm1
- Previous by thread: Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- Next by thread: Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
- Index(es):