[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20121113230446.GJ2489@linux.vnet.ibm.com>
Date: Tue, 13 Nov 2012 15:04:47 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Darren Hart <darren@...art.com>
Cc: Nick Bowler <nbowler@...iptictech.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-rt-users@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
laijs@...fujitsu.com, dipankar@...ibm.com,
Andrew Morton <akpm@...ux-foundation.org>,
mathieu.desnoyers@...icios.com,
Josh Triplett <josh@...htriplett.org>,
Nivedita Singhvi <niv@...ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>, Valdis.Kletnieks@...edu,
David Howells <dhowells@...hat.com>, edumazet@...gle.com,
Frédéric Weisbecker <fweisbec@...il.com>,
sbw@....edu, patches@...aro.org
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?
On Tue, Nov 13, 2012 at 02:33:48PM -0800, Darren Hart wrote:
> On Tue, Nov 13, 2012 at 2:25 PM, Paul E. McKenney <
> paulmck@...ux.vnet.ibm.com> wrote:
>
> > On Tue, Nov 13, 2012 at 04:47:20PM -0500, Nick Bowler wrote:
> > > On 2012-11-13 13:19 -0800, Paul E. McKenney wrote:
> > > > On Tue, Nov 13, 2012 at 12:56:54PM -0500, Nick Bowler wrote:
> > > > > On 2012-11-13 09:08 -0800, Paul E. McKenney wrote:
> > > > > > Suppose that TREE_PREEMPT_RCU was available for !SMP && PREEMPT
> > builds.
> > > > > > Would that work for you?
> > > > >
> > > > > To be honest I don't really know what the difference is, other than
> > what
> > > > > the help text says, which is:
> > > > >
> > > > > [TINY_PREEMPT_RCU] greatly reduces the memory footprint of RCU.
> > > > >
> > > > > "Greatly reduced memory footprint" sounds pretty useful...
> > > >
> > > > OK, so from your viewpoint, the only possible benefit is smaller
> > > > memory?
> > >
> > > Well, I have no idea. If I was given the choice between TREE_PREEMPT_RCU
> > > and TINY_PREEMPT_RCU, absent any information not in the description of
> > > these options, I would choose TINY. The description suggests that the
> > > memory savings come at the expense of SMP support, which sounds like a
> > > great tradeoff to make for a UP system.
> > >
> > > > How much memory does your device have, if I may ask?
> > >
> > > It's a (pretty old!) desktop. I recently had to upgrade it to two
> > > gigabytes due to unbearable thrashing with only one...
> >
> > If you have two gigabytes (or even one gigabyte), you won't notice the
> > few kilobytes of difference between TINY_PREEMPT_RCU and TREE_PREEMPT_RCU.
> >
> >
> In that case I don't have any reason to be concerned about it. It seems
> then as though "tiny" is meant to reduce memory usage on systems with a
> great deal of memory where the structures add up to consume significant
> amounts of memory?
The "tiny" is for extremely small systems. The difference in memory
consumption is otherwise not all that big a deal.
CONFIG_TINY_PREEMPT_RCU:
text data bss dec hex filename
1079 173 0 1252 4e4 /tmp/b/kernel/rcupdate.o
3223 105 4 3332 d04 /tmp/b/kernel/rcutiny.o
CONFIG_TREE_PREEMPT_RCU, NR_CPUS=2:
text data bss dec hex filename
1376 197 0 1573 625 /tmp/b/kernel/rcupdate.o
16545 2030 12 18587 489b /tmp/b/kernel/rcutree.o
So you get about 15Kbytes by using CONFIG_TINY_PREEMPT_RCU instead of
CONFIG_TREE_PREEMPT_RCU. Actually you get a bit less than that, because
CONFIG_TREE_PREEMPT_RCU's data would be a bit smaller for NR_CPUS=1.
But people who -really- care about memory measured in kilobytes
usually go all the way to CONFIG_TINY_RCU:
CONFIG_TINY_RCU:
text data bss dec hex filename
858 173 0 1031 407 /tmp/b/kernel/rcupdate.o
1788 47 0 1835 72b /tmp/b/kernel/rcutiny.o
This is about 2.5K better than CONFIG_TINY_PREEMPT_RCU. Also, !PREEMPT
reduces the size of the rest of the kernel as well.
Hence my belief that CONFIG_TINY_PREEMPT_RCU isn't really helping much
here.
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists