mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH] rcutree: Fix v3.4-rc2-rt2 build break
Date: Thu, 12 Apr 2012 16:11:53 -0700	[thread overview]
Message-ID: <20120412231153.GG2394@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1204122142180.2542@ionos>

On Thu, Apr 12, 2012 at 09:46:16PM +0200, Thomas Gleixner wrote:
> On Wed, 11 Apr 2012, John Kacur wrote:
> 
> > Fix build break of the following types.
> > 
> > linux-rt/kernel/rcutree_plugin.h: In function ‘print_cpu_stall_fast_no_hz’:
> > linux-rt/kernel/rcutree_plugin.h:2195: error: ‘rcu_idle_gp_timer’ undeclared (first use in this function)
> > linux-rt/kernel/rcutree_plugin.h:2195: error: (Each undeclared identifier is reported only once
> > linux-rt/kernel/rcutree_plugin.h:2195: error: for each function it appears in.)
> > 
> > The build break only occurs with the PREEMPT_RT_FULL patch applied, however
> > the patch is meant to go upstream and be applied to v3.4-rc2 as well because
> > it makes the code more legible there, and will reduce the number of places
> > where #ifdef PREEMPT_RT_FULL is required should that go upstream someday.

OK, I will bite...

What is PREEMPT_RT_FULL doing to make rcu_idle_gp_timer, which is under
CONFIG_RCU_FAST_NO_HZ, inaccessible to print_cpu_stall_fast_no_hz() which
is under both CONFIG_RCU_FAST_NO_HZ and CONFIG_RCU_CPU_STALL_INFO?

> -ENOPARSE
> 
> I really have no idea what the patch is solving and which particular
> combination of config items is causing the above.
> 
> If you think that the patch should go upstream then please send a
> separate one with a changelog which explains the simplifcation.
> 
> I agree that this ifdef maze can do with simplification, but providing
> a changelog which tells nothing at all does not make it easier to grok
> the problem and understand what's simplified.

I must confess that I have been considering re-organizing the #ifdefs
in kernel/rcutree_plugin.h so that all variants of a given function are
adjacent, but I have not yet felt quite masochistic enough to insert
quite that many extra #ifdefs.

The current organization is as follows:

o	Boot-time announce functions.

o	A large number of plugin functions that have real code
	for CONFIG_TREE_PREEMPT_RCU and trivial definitions for
	CONFIG_TREE_RCU.  In the 3.3 kernel, this region extends from line
	73 to line 1135, and used to be the whole point of this file.
	This region contains additional #ifdefs for CONFIG_HOTPLUG_CPU,
	CONFIG_RCU_BOOST (which cannot go into the next region because
	they are used in this region) CONFIG_RCU_CPU_STALL_VERBOSE,
	and CONFIG_PROVE_LOCKING.

o	Another set of plugin functions that have real code for
	CONFIG_RCU_BOOST and trivial definitions otherwise.  In the
	3.3 kernel, this region extends from line 1137 to line 1824,
	and contains additional #ifdefs for CONFIG_HOTPLUG_CPU and
	CONFIG_RCU_TRACE.

o	Yet another set of plugin functions that have real code for
	CONFIG_SMP and trivial definitions otherwise.  In the 3.3
	kernel this region extends from line 1826 to 1950.  This
	is going away, as CONFIG_TREE_RCU&!CONFIG_SMP will no longer
	be an option.

o	The next set of plugin functions have real code for
	CONFIG_RCU_FAST_NO_HZ and trivial definitions otherwise.
	In the 3.3 kernel, this region extends from line 1952 to
	line 2199.  This region contains additional #ifdefs for
	CONFIG_TREE_PREEMPT_RCU.

o	A new set of plugin functions is going in for
	CONFIG_RCU_CPU_STALL_INFO.

So that is the organization.  I might contemplate small changes such
as moving a function or two to save a #ifdef, but I would have to be
convinced that any wholesale reorganization would actually produce
better results.  Given the amount of code, don't expect me to be easy
to convince.  ;-)

							Thanx, Paul


  reply	other threads:[~2012-04-12 23:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 14:42 John Kacur
2012-04-12 19:46 ` Thomas Gleixner
2012-04-12 23:11   ` Paul E. McKenney [this message]
2012-04-12 23:13   ` John Kacur

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=20120412231153.GG2394@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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®