All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Josh Boyer <jwboyer@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: 3.0-git15 Atomic scheduling in pidmap_init
Date: Mon, 15 Aug 2011 08:20:52 -0700	[thread overview]
Message-ID: <20110815152052.GA2389@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110815140416.GB2227@zod.bos.redhat.com>

On Mon, Aug 15, 2011 at 10:04:17AM -0400, Josh Boyer wrote:
> On Sun, Aug 14, 2011 at 04:04:53PM -0700, Paul E. McKenney wrote:
> > > > > > Now rcu_init_percpu_data() still sets rdp->qs_pending to 1, and that
> > > > > > is going to stay as is as long as preemption is disabled.
> > > > > 
> > > > > But setting rdp->qs_pending to 1 in rcu_init_percpu_data() has no effect
> > > > > until a grace period starts.  So, if grace periods are prevented from
> > > 
> > > Er... really?  Because it gets set and __rcu_pending looks at it
> > > unconditionally in the case that is calling set_need_resched.  It
> > > doesn't check if there is anything about a grace period going on or not.
> > 
> > Frederic noted the condition that prevents this at boot time, but it
> > appears that newly onlined CPUs might send themselves needless resched
> > IPIs at runtime if RCU is idle.
> > 
> > > > > starting, no need to mess with rcu_init_percpu_data().  Especially given
> > > > > that rcu_init_percpu_data() is also used at late boot and runtime for
> > > > > CPU hotplug.
> > > > 
> > > > Ok.
> > > > 
> > > > > 
> > > > > So I believe that it is sufficient to change cpu_needs_another_gp()
> > > > > to check for boot being far enough along to allow grace periods.
> > > > 
> > > > Yep, sounds good.
> > > 
> > > I looked at doing this but got lost as to 1) how it would help the
> > > situtation I've reported, and 2) exactly how to do that.
> > 
> > It would prevent control from reaching that point, and that might
> > well be needed for other reasons.  (This bit about RCU needing to
> > work differently at boot time is, well, "interesting".)
> > 
> > > I'd be happy to test, but at the moment the proposed solution is
> > > confusing to me.
> > 
> > Please see the attached.
> 
> Fixed it up quickly to apply on top of -rc2 and it seems to solve the
> problem nicely.  Thanks for the patch.

Good to hear!  I guess I should keep it, then.  ;-)

							Thanx, Paul

  reply	other threads:[~2011-08-15 15:20 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 15:46 3.0-git15 Atomic scheduling in pidmap_init Josh Boyer
2011-08-04 11:46 ` Josh Boyer
2011-08-04 14:04   ` Paul E. McKenney
2011-08-04 15:06     ` Josh Boyer
2011-08-04 16:26       ` Paul E. McKenney
2011-08-04 17:31         ` Josh Boyer
2011-08-05  1:19           ` Josh Boyer
2011-08-05  6:56             ` Paul E. McKenney
2011-08-05 14:22               ` Josh Boyer
2011-08-05 17:08                 ` Frederic Weisbecker
2011-08-05 22:26                   ` Paul E. McKenney
2011-08-05 23:12                     ` Frederic Weisbecker
2011-08-08  2:09                       ` Paul E. McKenney
2011-08-08  2:55                         ` Frederic Weisbecker
2011-08-08  3:10                           ` Paul E. McKenney
2011-08-09 11:35                             ` Frederic Weisbecker
2011-08-10 12:45                               ` Josh Boyer
2011-08-10 14:53                                 ` Frederic Weisbecker
2011-08-10 15:03                                   ` Josh Boyer
2011-08-14 23:04                                 ` Paul E. McKenney
2011-08-15 14:04                                   ` Josh Boyer
2011-08-15 15:20                                     ` Paul E. McKenney [this message]
2011-08-17 22:37                                       ` Josh Boyer
2011-08-17 22:49                                         ` Paul E. McKenney
2011-08-17 23:02                                           ` Josh Boyer
2011-08-17 23:06                                             ` Frederic Weisbecker
2011-08-17 23:17                                               ` Josh Boyer
2011-08-18 18:35                                                 ` Paul E. McKenney
2011-08-18 19:11                                                   ` Josh Boyer
2011-08-18 21:00                                                   ` Andrew Morton
2011-08-18 21:23                                                     ` Paul E. McKenney
2011-08-18 21:55                                                       ` Paul E. McKenney
2011-08-18 22:21                                                         ` Josh Boyer
2011-08-18 23:01                                                           ` Paul E. McKenney
2011-08-24 22:45                                                         ` Frederic Weisbecker
2011-08-24 23:12                                                           ` Paul E. McKenney
2011-08-24 23:34                                                             ` Frederic Weisbecker
2011-08-24 23:57                                                               ` Paul E. McKenney
2011-08-18 22:19                                                       ` Josh Boyer
2011-08-18 23:16                                                         ` Paul E. McKenney
2011-08-18 23:27                                                           ` Andrew Morton
2011-08-19  0:38                                                             ` Paul E. McKenney

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=20110815152052.GA2389@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=jwboyer@redhat.com \
    --cc=linux-kernel@vger.kernel.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.