From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@shadowen.org>,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
mingo@elte.hu, dipankar@in.ibm.com, josht@linux.vnet.ibm.com,
tytso@us.ibm.com, dvhltc@us.ibm.com, tglx@linutronix.de
Subject: Re: [PATCH RFC] Priority boosting for preemptible RCU
Date: Wed, 22 Aug 2007 15:00:22 -0700 [thread overview]
Message-ID: <20070822220022.GF8786@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070822144154.dd156a28.akpm@linux-foundation.org>
On Wed, Aug 22, 2007 at 02:41:54PM -0700, Andrew Morton wrote:
> On Wed, 22 Aug 2007 14:22:16 -0700
> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
>
> > On Wed, Aug 22, 2007 at 12:43:40PM -0700, Andrew Morton wrote:
> > > On Wed, 22 Aug 2007 12:02:54 -0700
> > > "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> > >
> > > > Hello!
> > > >
> > > > This patch is a forward-port of RCU priority boosting (described in
> > > > http://lwn.net/Articles/220677/). It applies to 2.6.22 on top of
> > > > the patches sent in the http://lkml.org/lkml/2007/8/7/276 series and
> > > > the hotplug patch (http://lkml.org/lkml/2007/8/17/262). Passes several
> > > > hours of rcutorture on x86_64 and POWER, so OK for experimentation but
> > > > not ready for inclusion.
> > >
> > > It'd be nice to have a brief summary of why we might want this code in Linux.
> >
> > Good point -- will add something like the following in the next rev:
> >
> > RCU priority boosting is needed when running a workload that might
> > include CPU-bound user tasks running at realtime priorities with
> > a CONFIG_PREEMPT build of the kernel. In this situation, RCU
> > priority boosting is needed to avoid OOM.
> >
> > Does that cover it?
>
> yup
>
> > > > +config PREEMPT_RCU_BOOST_STATS_INTERVAL
> > >
> > > Four new config options? Sob. Zero would be preferable.
> >
> > Hmmm... I should be able to fold this into PREEMPT_RCU_BOOST_STATS,
> > now that you mention it. Zero to disable, other number to specify
> > interval. And I should move this to the kernel-hacking group as
> > well. Would that help?
>
> The fewer the better.
>
> We want to avoid options which some people might want to enable in normal
> production and which other people might want to disable in normal
> production. Because most people don't build custom kernels and the person
> who builds their kernels for them needs to make a decision for them. We
> don't want to force the person who configures others' kernels to have to
> make nasty compromises.
>
> Config options which are clearly kernel-devleoper-only are fine: people can
> just turn them off for production.
Sounds good -- PREEMPT_RCU_BOOST_STATS is strictly for kernel developers.
> > > for_each_possible_cpu() can sometimes do a *lot* more work than
> > > for_each_online_cpu(). And even for_each_present_cpu().
> >
> > for_each_online_cpu() would not cut it here, but for_each_present_cpu()
> > might -- as long as no platforms physically hotplug the CPUs.
>
> Platforms do physically hotplug cpus. All the hotplug notifier stuff is
> there so that code such as yours can synchronise against that.
OK, then I have to stay with for_each_possible_cpu(). If a CPU was
there an hour ago, I need to account for its contribution to the
statistics. I do heartily agree with the sentiment, however.
> > > Andy, can we have a checkpatch rule for SPIN_LOCK_UNLOCKED please? It's
> > > basically always wrong.
> >
> > Even for static initializers for top-level variables?
>
> Yes. For those, use DEFINE_SPINLOCK().
<slap forehead>
> > > > + if (unlikely(idx < 0))
> > > > + return (NULL);
> > >
> > > return-is-not-a-function
> >
> > You lost me on this one... You presumably aren't asking it to be converted
> > to a macro. You want it manually inlined where called?
>
> Do `return foo;', not `return (foo);' ;)
OK, got it. Another one in the "old habits die hard" list. ;-)
Thanx, Paul
next prev parent reply other threads:[~2007-08-22 22:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-22 19:02 [PATCH RFC] Priority boosting for preemptible RCU Paul E. McKenney
2007-08-22 19:43 ` Andrew Morton
2007-08-22 20:23 ` Josh Triplett
2007-08-22 21:22 ` Paul E. McKenney
2007-08-22 21:41 ` Andrew Morton
2007-08-22 22:00 ` Paul E. McKenney [this message]
2007-08-24 10:09 ` Andy Whitcroft
2007-08-23 4:26 ` Gautham R Shenoy
2007-08-23 8:54 ` Paul E. McKenney
2007-08-23 10:14 ` Gautham R Shenoy
2007-08-23 13:15 ` Paul E. McKenney
2007-08-23 14:22 ` Gautham R Shenoy
2007-08-23 15:55 ` Paul E. McKenney
2007-08-24 8:21 ` Gautham R Shenoy
2007-08-24 17:27 ` 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=20070822220022.GF8786@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=dipankar@in.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=josht@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=tytso@us.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.