[lkml]   [2005]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
Roman Zippel wrote:
> 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.

Maybe so, but what I'm doing is introducing a slightly better
implementation of what is currently in tree, and attempting to
follow current standards as far as possible. I don't think you
could say that is a bad thing.

Now I don't think anyone would be flat out opposed to 1 - reworking
the atomic.h code to allow some genericity (is that a word?); 2 -
reworking atomic.h code to allow combining of atomic ops, or allowing
interrupt unsafe ops...

Of course, neither is going to be merged unless done tastefully, and
I imagine both would be difficult to get right, with probably a low
cost/benefit ratio.


SUSE Labs, Novell Inc.

Send instant messages to your online friends

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-09-18 10:11    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean