From: Oleg Nesterov <oleg@redhat.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Howells <dhowells@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
David Smith <dsmith@redhat.com>,
"Frank Ch. Eigler" <fche@redhat.com>,
Larry Woodman <lwoodman@redhat.com>,
Peter Zijlstra <peterz@infradead.org>, Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: hlist_for_each_entry && pos (Was: task_work_queue)
Date: Tue, 17 Apr 2012 22:43:22 +0200 [thread overview]
Message-ID: <20120417204322.GA22946@redhat.com> (raw)
In-Reply-To: <20120416223512.GI2448@linux.vnet.ibm.com>
On 04/16, Paul E. McKenney wrote:
>
> On Thu, Apr 12, 2012 at 06:00:59AM +0200, Oleg Nesterov wrote:
> >
> > hlist_for_each_entry_*() do not need "pos", it can be
> >
> > #define hlist_for_each_entry(pos, head, member) \
> > for (pos = (void*)(head)->first; \
> > pos && ({ pos = hlist_entry((void*)pos, typeof(*pos), member); 1; }); \
> > pos = (void*)(pos)->member.next)
> >
> > The only problem, is there any possibility to change the callers
> > somehow??? I even wrote the script which converts them all, but the
> > patch is huge.
> >
> > Please see the old (2008-04-21) message I sent to lkml below, today
> > the diffstat is even "worse":
> >
> > 152 files changed, 611 insertions(+), 906 deletions(-)
> >
> > and the patch size is 242k.
> >
> > No? we can't?
>
> Maybe this needs a phased approach:
>
> 1. Add a new API name without the "pos" argument.
and this is the first (or main?) problem. Which name??
> 2. Send individual patches to the uses, which allows time to
> clean up stragglers.
>
> 3. Remove the old API name. If any patches from #2 have been
> ignored, push them with the removal patch.
>
> 4. Rename the new API name to the old one, if desired.
Yes, this is much safer, I agree. But I'm afraid that 2. will be
never finished.
And 4. is not trivial anyway, even if it is trivial to generate
the obviously correct patch. Too many trees I guess.
This reminds me I promised to check the code generation. Will do
anyway. But I do not expect any improvement, just it should not
be worse. The only point is too make the usage more simple (you
seem to agree). But at the same time I agree with "the pain
changing the interface" from Linus.
Oleg.
next prev parent reply other threads:[~2012-04-17 20:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 2:47 [PATCH v2 0/2] task_work_queue() && keyctl_session_to_parent() Oleg Nesterov
2012-04-12 2:48 ` [PATCH v2 1/2] task_work_queue: add generic process-context callbacks Oleg Nesterov
2012-04-12 4:00 ` hlist_for_each_entry && pos (Was: task_work_queue) Oleg Nesterov
2012-04-12 4:12 ` Linus Torvalds
2012-04-12 4:28 ` Oleg Nesterov
2012-04-12 4:39 ` Linus Torvalds
2012-04-12 5:02 ` Al Viro
2012-04-16 22:35 ` Paul E. McKenney
2012-04-17 20:43 ` Oleg Nesterov [this message]
2012-04-12 9:35 ` TIF_NOTIFY_RESUME [was Re: [PATCH v2 1/2] task_work_queue: add generic process-context callbacks] David Howells
2012-04-12 17:41 ` Oleg Nesterov
2012-04-12 2:48 ` [PATCH v2 2/2] cred: change keyctl_session_to_parent() to use task_work_queue() Oleg Nesterov
2012-04-12 9:29 ` David Howells
2012-04-12 17:34 ` Oleg Nesterov
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=20120417204322.GA22946@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dsmith@redhat.com \
--cc=fche@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lwoodman@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox