From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
Linux Kernel Mailing List <Linux-Kernel@vger.kernel.org>,
Dipankar Sarma <dipankar@in.ibm.com>
Subject: Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero
Date: Sun, 18 Sep 2005 18:08:35 +1000 [thread overview]
Message-ID: <432D2083.6030707@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.61.0509170300030.3743@scrub.home>
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.
Thanks,
Nick
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2005-09-18 8:07 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 14:48 [PATCH 1/5] atomic: introduce atomic_cmpxchg Nick Piggin
2005-09-14 14:49 ` [PATCH 2/5] atomic: introduce atomic_inc_not_zero Nick Piggin
2005-09-14 14:51 ` [PATCH 3/5] rcu file: use atomic primitives Nick Piggin
2005-09-14 14:55 ` [PATCH 4/5] atomic: dec_and_lock use cmpxchg Nick Piggin
2005-09-14 15:01 ` [PATCH 5/5] remove HAVE_ARCH_CMPXCHG Nick Piggin
2005-09-14 16:31 ` Roman Zippel
2005-09-14 16:49 ` Nick Piggin
2005-09-14 17:59 ` David S. Miller
2005-09-14 22:03 ` Russell King
2005-09-14 22:26 ` David S. Miller
2005-09-15 7:10 ` Russell King
2005-09-15 13:08 ` Alan Cox
2005-09-14 15:20 ` [PATCH 4/5] atomic: dec_and_lock use cmpxchg Nick Piggin
2005-09-14 16:24 ` David S. Miller
2005-09-14 16:52 ` Nick Piggin
2005-09-17 0:05 ` David S. Miller
2005-09-14 16:16 ` [PATCH 2/5] atomic: introduce atomic_inc_not_zero Roman Zippel
2005-09-14 16:44 ` Nick Piggin
2005-09-14 17:04 ` Nick Piggin
2005-09-14 17:18 ` Roman Zippel
2005-09-14 22:00 ` Russell King
2005-09-14 22:10 ` Roman Zippel
2005-09-14 22:21 ` Russell King
2005-09-15 1:51 ` Nick Piggin
2005-09-17 1:15 ` Roman Zippel
2005-09-17 6:36 ` Andrew Morton
2005-09-17 10:01 ` Roman Zippel
2005-09-17 7:19 ` David S. Miller
2005-09-17 7:34 ` Dipankar Sarma
2005-09-18 8:08 ` Nick Piggin [this message]
2005-09-17 0:59 ` Roman Zippel
2005-09-17 7:18 ` David S. Miller
2005-09-17 7:27 ` Russell King
2005-09-18 6:03 ` David S. Miller
2005-09-14 15:17 ` [PATCH 1/5] atomic: introduce atomic_cmpxchg Russell King
2005-09-14 15:22 ` Nick Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=432D2083.6030707@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=Linux-Kernel@vger.kernel.org \
--cc=dipankar@in.ibm.com \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.