From: Oleg Nesterov <oleg@tv-sign.ru>
To: paulmck@us.ibm.com
Cc: linux-kernel@vger.kernel.org,
Dipankar Sarma <dipankar@in.ibm.com>,
Manfred Spraul <manfred@colorfullife.com>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
vatsa@in.ibm.com
Subject: Re: [PATCH 5/5][RFC] rcu: start new grace period from rcu_pending()
Date: Mon, 09 Jan 2006 22:14:44 +0300 [thread overview]
Message-ID: <43C2B624.C70A4D6E@tv-sign.ru> (raw)
In-Reply-To: <20060109173656.GC14738@us.ibm.com>
"Paul E. McKenney" wrote:
>
> On Mon, Jan 09, 2006 at 05:32:55PM +0300, Oleg Nesterov wrote:
> > Oleg Nesterov wrote:
> > >
> > > I think it is better to set ->qs_pending = 1 directly in __rcu_pending():
> >
> > This patch has a bug. I am sending a trivial fix, but now I am not
> > sure myself that 1 timer tick saved worth the code uglification.
>
> This is indeed an accident waiting to happen -- someone is bound to
> replace the "|" with an "||", a change that is too easy for someone
> to miss. Once Vatsa is satisfied with the CPU-hotplug aspects of
> this set of patches, if __rcu_pending() still has side-effects, I would
> suggest something like the following:
>
> int rcu_pending(int cpu)
> {
> int retval = 0;
>
> if (__rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)))
> retval = 1;
> if (__rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu)))
> retval = 1;
> return retval;
> }
>
> A few more lines, but the intent is much more clear. And I bet that
> gcc generates reasonable code in either case.
>
> Or maybe this is just me...
No, me too. For some reasons I can't re-send the patch today, will do
tomorrow.
However, I am not sure anymore that this patch is a good idea. Exactly
because it adds side-effects to rcu_pending().
So, unless somebody on CC: list thinks it may be useful - let's forget
it.
Oleg.
prev parent reply other threads:[~2006-01-09 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-08 19:19 Oleg Nesterov
2006-01-09 14:32 ` Oleg Nesterov
2006-01-09 17:36 ` Paul E. McKenney
2006-01-09 19:14 ` Oleg Nesterov [this message]
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=43C2B624.C70A4D6E@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=paulmck@us.ibm.com \
--cc=torvalds@osdl.org \
--cc=vatsa@in.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®