From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Dipankar Sarma <dipankar@in.ibm.com>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: [patch 1/2] rcu batch tuning
Date: Sun, 29 Jan 2006 19:30:00 -0800 [thread overview]
Message-ID: <20060130032959.GC16585@us.ibm.com> (raw)
In-Reply-To: <43DBB2D1.8E79F4CE@tv-sign.ru>
On Sat, Jan 28, 2006 at 09:07:13PM +0300, Oleg Nesterov wrote:
> "Paul E. McKenney" wrote:
> >
> > On Fri, Jan 27, 2006 at 10:57:59PM +0300, Oleg Nesterov wrote:
> > >
> > > When ->qlen exceeds qhimark for the first time we send reschedule IPI to
> > > other CPUs and force_quiescent_state() records ->last_rs_qlen = ->qlen.
> > > But we don't reset ->last_rs_qlen when ->qlen goes to 0, this means that
> > > next time we need ++rdp->qlen > qhimark + rsinterval to force other CPUS
> > > to pass quiescent state, no?
> >
> > Good catch -- this could well explain Lee's continuing to hit
> > latency problems. Although this would not cause the first
> > latency event, only subsequent ones, it seems to me that ->last_rs_qlen
> > should be reset whenever ->blimit is reset.
>
> May be it's better to do it in other way?
>
> struct rcu_ctrlblk {
> ...
> int signaled;
> ...
> };
>
> void force_quiescent_state(rdp, rcp)
> {
> if (!rcp->signaled) {
> // racy, but tolerable
> rcp->signaled = 1;
>
> for_each_cpu_mask(cpu, cpumask)
> smp_send_reschedule(cpu);
> }
> }
>
> void rcu_start_batch(rcp, rdp)
> {
> if (->next_pending && ->completed == ->cur) {
> ...
> rcp->signaled = 0;
> ...
> }
> }
Possibly... But the best thing would be for you and Dipankar to
get together to work out the best strategy for this.
Thanx, Paul
> Probably it is also makes sense to tasklet_schedule(rcu_tasklet)
> in call_rcu() when ++rdp->qlen > qhimark, this way we can detect
> that we need to start the next batch earlier.
>
> > > Also, it seems to me it's better to have 2 counters, one for length(->donelist)
> > > and another for length(->curlist + ->nxtlist). I think we don't need
> > > force_quiescent_state() when all rcu callbacks are placed in ->donelist,
> > > we only need to increase rdp->blimit in this case.
> >
> > True, currently the patch keeps the sum of the length of all three lists,
> > and takes both actions when the sum gets too large. But the only way
> > you would get unneeded IPIs would be if callback processing was
> > stalled, but callback generation and grace-period processing was
> > still proceeding. Seems at first glance to be an unusual corner
> > case, with the only downside being some extra IPIs. Or am I missing
> > some aspect?
>
> Yes, it is probably not worth to complicate the code.
>
> Oleg.
>
next prev parent reply other threads:[~2006-01-30 3:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 19:57 [patch 1/2] rcu batch tuning Oleg Nesterov
2006-01-27 23:42 ` Paul E. McKenney
2006-01-28 18:07 ` Oleg Nesterov
2006-01-30 3:30 ` Paul E. McKenney [this message]
2006-01-28 17:08 ` Dipankar Sarma
-- strict thread matches above, loose matches on Subject: below --
2006-02-17 15:41 [PATCH 0/2] RCU updates Dipankar Sarma
2006-02-17 15:43 ` [PATCH 1/2] rcu batch tuning Dipankar Sarma
2006-02-17 20:33 ` Dipankar Sarma
2006-02-18 8:45 ` Andrew Morton
2006-02-18 9:15 ` Dipankar Sarma
2006-01-26 18:40 [patch 0/2] RCU: fix various latency/oom issues Dipankar Sarma
2006-01-26 18:41 ` [patch 1/2] rcu batch tuning Dipankar Sarma
2006-01-26 19:33 ` Paul E. McKenney
2006-01-26 19:42 ` Dipankar Sarma
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=20060130032959.GC16585@us.ibm.com \
--to=paulmck@us.ibm.com \
--cc=akpm@osdl.org \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=torvalds@osdl.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