From: Andrew Morton <akpm@linux-foundation.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Christoph Lameter <cl@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Nick Piggin <npiggin@kernel.dk>
Subject: Re: [PATCH] atomic: add atomic_inc_not_zero_hint()
Date: Fri, 5 Nov 2010 11:28:21 -0700 [thread overview]
Message-ID: <20101105112821.57f80481.akpm@linux-foundation.org> (raw)
In-Reply-To: <1288981224.2882.1105.camel@edumazet-laptop>
On Fri, 05 Nov 2010 19:20:24 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le vendredi 05 novembre 2010 __ 11:08 -0700, Andrew Morton a __crit :
> > On Fri, 05 Nov 2010 19:00:46 +0100
> > Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >
> > > Le vendredi 05 novembre 2010 __ 10:20 -0700, Andrew Morton a __crit :
> > >
> > > > It totally makes sense to add include/linu/atomic.h for common things.
> > > > Perhaps there's already code in arch/*/include/asm/atomic.h which
> > > > should be hoisted up there. But that can't reliably be done until a
> > > > million files have had their #includes switched :(
> > > >
> > >
> > > Maybe including <linux/atomic.h> only from the end of various
> > >
> > > arch/*/include/asm/atomic.h ?
> >
> > heh, I guess that would work. It breaks the standard way of doing
> > these things (I think?) so let's not go there unless we have a need?
> >
> > > In this case, I remove the include <asm/atomic.h> from linux/atomic.h
> >
> > Oh. Why? I thought it was better the previous, standard way: thou
> > shalt henceforth include liunx/atomic.h, not asm/atomic.h. And the
> > presence of linux/atomic.h will in fact trigger the checkpatch warning
> > telling people to use that when they try to use asm/atomic.h.
>
> Hmm, if we want to move the common stuff from
> arch/*/include/asm/atomic.h to this new file (include/linux/atomic.h),
> then we would have to change hundred of
>
> #include <asm/atomic.h>
>
> to
>
> #include <linux/atomic.h>
>
> This seems a big task to me ?
>
> Or just make a whole tree replace ?
>
But we haven't established that there _is_ duplicated code which needs
that treatment.
Scanning arch/x86/include/asm/atomic.h, perhaps ATOMIC_INIT() is a
candidate. But I'm not sure that it _should_ be hoisted up - if every
architecture happens to do it the same way then that's just a fluke.
next prev parent reply other threads:[~2010-11-05 18:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 16:53 [PATCH] atomic: add atomic_inc_not_zero_hint() Eric Dumazet
2010-11-05 17:20 ` Andrew Morton
2010-11-05 18:00 ` Eric Dumazet
2010-11-05 18:08 ` Andrew Morton
2010-11-05 18:20 ` Eric Dumazet
2010-11-05 18:28 ` Andrew Morton [this message]
2010-11-05 19:20 ` Eric Dumazet
2010-11-05 19:39 ` Andrew Morton
2010-11-05 19:46 ` Eric Dumazet
2010-11-05 19:51 ` Paul E. McKenney
2010-11-12 19:14 ` Christoph Lameter
2010-11-13 22:26 ` Paul E. McKenney
2010-11-15 13:57 ` Christoph Lameter
2010-11-15 14:07 ` Andi Kleen
2010-11-15 14:16 ` Christoph Lameter
2010-11-15 14:17 ` Eric Dumazet
2010-11-15 14:25 ` Christoph Lameter
2010-11-15 14:39 ` Andi Kleen
2010-11-15 14:47 ` Eric Dumazet
2010-11-05 18:40 ` Paul E. McKenney
2010-11-05 19:12 ` Eric Dumazet
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=20101105112821.57f80481.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=acme@infradead.org \
--cc=andi@firstfloor.org \
--cc=cl@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=npiggin@kernel.dk \
--cc=paulmck@linux.vnet.ibm.com \
/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.