linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@redhat.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/10] rcu: Cleanup RCU tree initialization
Date: Tue, 10 Mar 2015 14:33:37 +0000	[thread overview]
Message-ID: <20150310143337.GA5084@agordeev.usersys.redhat.com> (raw)
In-Reply-To: <20150309213542.GC5236@linux.vnet.ibm.com>

On Mon, Mar 09, 2015 at 02:35:42PM -0700, Paul E. McKenney wrote:
> On Mon, Mar 09, 2015 at 09:36:52AM +0000, Alexander Gordeev wrote:
> > On Mon, Mar 09, 2015 at 09:34:04AM +0100, Alexander Gordeev wrote:
> > > Hi Paul,
> > > 
> > > Here is cleanup of RCU tree initialization rebased on linux-rcu rcu/next
> > > repo, as you requested. Please, note an extra patch #10 that was not
> > > present in the first post.
> > 
> > Paul,
> > 
> > Please, ignore patch #10 for now. I missed to notice rcu_node::grpnum is
> > used in tracing, so the patch is incomplete. I am not sure why trailing
> > spaces in seq_printf(m, "%lx/%lx->%lx %c%c>%c %d:%d ^%d    ", ....) are
> > needed for, so not sure if "^%d" part should be removed (possibly with
> > the traling spaces) or replaced with three spaces.
> 
> OK, dropping this one for the moment.
> 
> The original use of ->grpnum was for manual debugging purposes.  Yes, you
> can get the same information out of ->grpmask, but the number is easier
> to read.  And on the debugfs trace information, ->grpnum is printed,
> but ->grpmask is not.
> 
> The trailing spaces on the seq_printf() allow the rcu_node data to be
> printed on a single line, while still allowing the eye to pick out
> where one rcu_node structure's data ends and the next one begins.
> 
> So here are the choices, as far as I can see:
> 
> 1.	Leave ->grpnum as is.
> 
> 2.	Remove ->grpnum, but regenerate it in print_one_rcu_state(),
> 	for example, by counting the number of rcu_node structures
> 	since the last ->level change.
> 
> 3.	Drop ->grpnum and also remove it from the debugfs tracing.
> 	The reader can rely on the ->grplo and ->grphi fields to
> 	work out where this rcu_node structure fits in, but we
> 	lose the visual indication of any bugs in computing these
> 	quantities.
> 
> 4.	Drop ->grpnum and replace it with ->grpmask.  This seems a
> 	bit obtuse to me.
> 
> 5.	Redesign print_one_rcu_state()'s output from scratch.
> 
> #1 has certain advantages from a laziness viewpoint.  #2 would open up
> some space in the rcu_node structure, but space really isn't an issue
> for that structure given that huge systems have only 257 of them and
> the really small systems use Tiny RCU instead.  #3 might be OK, but I
> am not really convinced.  #4 seems a bit ugly.  I am not signing up
> for #5, in part because not all that many people use RCU's debugfs
> output, so I don't see the point in investing the time.
> 
> But what did you have in mind?

I probably should have marked this patch as an RFC. Given your summary
#1 seems as the best choice.

However, I have something else in mind, indeed. What is the reason to
have 'grpnum' and 'level' as u8 while, say 'grplo' and 'grphi' - as int?
IOW, do we conserve on memory for this structure or not?

Thanks!

> 							Thanx, Paul
> 

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

  reply	other threads:[~2015-03-10 14:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09  8:34 [PATCH 00/10] rcu: Cleanup RCU tree initialization Alexander Gordeev
2015-03-09  8:34 ` [PATCH 01/10] rcu: Panic if RCU tree can not accommodate all CPUs Alexander Gordeev
2015-03-09  8:34 ` [PATCH 02/10] rcu: Remove superfluous local variable in rcu_init_geometry() Alexander Gordeev
2015-03-09  8:34 ` [PATCH 03/10] rcu: Cleanup rcu_init_geometry() code and arithmetics Alexander Gordeev
2015-03-09  8:34 ` [PATCH 04/10] rcu: Simplify rcu_init_geometry() capacity arithmetics Alexander Gordeev
2015-03-09  8:34 ` [PATCH 05/10] rcu: Limit rcu_state::levelcnt[] to RCU_NUM_LVLS items Alexander Gordeev
2015-03-09  8:34 ` [PATCH 06/10] rcu: Limit rcu_capacity[] size " Alexander Gordeev
2015-03-09  8:34 ` [PATCH 07/10] rcu: Remove unnecessary fields from rcu_state structure Alexander Gordeev
2015-03-09  8:34 ` [PATCH 08/10] rcu: Limit count of static data to the number of RCU levels Alexander Gordeev
2015-03-09  8:34 ` [PATCH 09/10] rcu: Simplify arithmetic to calculate number of RCU nodes Alexander Gordeev
2015-03-09  8:34 ` [PATCH 10/10] rcu: Remove unnecessary grpnum field from rcu_node structure Alexander Gordeev
2015-03-09  9:36 ` [PATCH 00/10] rcu: Cleanup RCU tree initialization Alexander Gordeev
2015-03-09 21:35   ` Paul E. McKenney
2015-03-10 14:33     ` Alexander Gordeev [this message]
2015-03-10 14:57       ` Paul E. McKenney
2015-03-09 21:40 ` Paul E. McKenney
2015-03-09 23:39   ` Paul E. McKenney
2015-03-09 23:49     ` Paul E. McKenney
2015-03-10  4:43       ` Paul E. McKenney
2015-03-10 14:39         ` Alexander Gordeev
2015-03-10 14:52           ` 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=20150310143337.GA5084@agordeev.usersys.redhat.com \
    --to=agordeev@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.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;
as well as URLs for NNTP newsgroup(s).