2012-11-13 00:50:18

by Paul E. McKenney

[permalink] [raw]
Subject: Does anyone use CONFIG_TINY_PREEMPT_RCU?

Hello!

I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
was not a viable option (in contrast, the people running Linux on
tiny-memmory systems typically use TINY_RCU). Of course, if no one
really needs it, the proper thing to do is to remove it.

So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
remove it, probably in the 3.9 timeframe.

Thanx, Paul


2012-11-13 01:12:29

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

2012/11/13 Paul E. McKenney <[email protected]>:
> Hello!
>
> I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> was not a viable option (in contrast, the people running Linux on
> tiny-memmory systems typically use TINY_RCU). Of course, if no one
> really needs it, the proper thing to do is to remove it.
>
> So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> remove it, probably in the 3.9 timeframe.

I don't use it personally but if you remove it, does that mean that
RCU couldn't be preemptible on UP?

2012-11-13 01:17:23

by Josh Triplett

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 02:12:27AM +0100, Frederic Weisbecker wrote:
> 2012/11/13 Paul E. McKenney <[email protected]>:
> > Hello!
> >
> > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> > was not a viable option (in contrast, the people running Linux on
> > tiny-memmory systems typically use TINY_RCU). Of course, if no one
> > really needs it, the proper thing to do is to remove it.
> >
> > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> > remove it, probably in the 3.9 timeframe.
>
> I don't use it personally but if you remove it, does that mean that
> RCU couldn't be preemptible on UP?

No, it would mean that on UP you could choose between TINY_RCU and
TREE_PREEMPT_RCU, depending on whether you want tiny or preemptible.

- Josh Triplett

2012-11-13 01:32:47

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 02:12:27AM +0100, Frederic Weisbecker wrote:
> 2012/11/13 Paul E. McKenney <[email protected]>:
> > Hello!
> >
> > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> > was not a viable option (in contrast, the people running Linux on
> > tiny-memmory systems typically use TINY_RCU). Of course, if no one
> > really needs it, the proper thing to do is to remove it.
> >
> > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> > remove it, probably in the 3.9 timeframe.
>
> I don't use it personally but if you remove it, does that mean that
> RCU couldn't be preemptible on UP?

It would mean that a kernel built with SMP=n and PREEMPT=y would use
TREE_PREEMPT_RCU rather than the current TINY_PREEMPT_RCU. So it would
work just as well, but use somewhat more memory.

Thanx, Paul

2012-11-13 01:34:09

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

2012/11/13 Josh Triplett <[email protected]>:
> On Tue, Nov 13, 2012 at 02:12:27AM +0100, Frederic Weisbecker wrote:
>> 2012/11/13 Paul E. McKenney <[email protected]>:
>> > Hello!
>> >
>> > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
>> > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
>> > was not a viable option (in contrast, the people running Linux on
>> > tiny-memmory systems typically use TINY_RCU). Of course, if no one
>> > really needs it, the proper thing to do is to remove it.
>> >
>> > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
>> > remove it, probably in the 3.9 timeframe.
>>
>> I don't use it personally but if you remove it, does that mean that
>> RCU couldn't be preemptible on UP?
>
> No, it would mean that on UP you could choose between TINY_RCU and
> TREE_PREEMPT_RCU, depending on whether you want tiny or preemptible.

Ok. I thought the TREE version wasn't possible anymore on UP when I
saw some patches that removed optimizations for nr_online_cpus=1.
Hence the confusion.

2012-11-13 01:43:48

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 02:34:06AM +0100, Frederic Weisbecker wrote:
> 2012/11/13 Josh Triplett <[email protected]>:
> > On Tue, Nov 13, 2012 at 02:12:27AM +0100, Frederic Weisbecker wrote:
> >> 2012/11/13 Paul E. McKenney <[email protected]>:
> >> > Hello!
> >> >
> >> > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> >> > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> >> > was not a viable option (in contrast, the people running Linux on
> >> > tiny-memmory systems typically use TINY_RCU). Of course, if no one
> >> > really needs it, the proper thing to do is to remove it.
> >> >
> >> > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> >> > remove it, probably in the 3.9 timeframe.
> >>
> >> I don't use it personally but if you remove it, does that mean that
> >> RCU couldn't be preemptible on UP?
> >
> > No, it would mean that on UP you could choose between TINY_RCU and
> > TREE_PREEMPT_RCU, depending on whether you want tiny or preemptible.
>
> Ok. I thought the TREE version wasn't possible anymore on UP when I
> saw some patches that removed optimizations for nr_online_cpus=1.
> Hence the confusion.

Those optimizations are not critically important. That said, yes, I will
need to restart testing of TREE_PREEMPT_RCU on !SMP kernels.

Thanx, Paul

2012-11-13 14:46:24

by Nick Bowler

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On 2012-11-12 16:49 -0800, Paul E. McKenney wrote:
> Hello!
>
> I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> was not a viable option (in contrast, the people running Linux on
> tiny-memmory systems typically use TINY_RCU). Of course, if no one
> really needs it, the proper thing to do is to remove it.
>
> So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> remove it, probably in the 3.9 timeframe.

Yes, I use TINY_PREEMPT_RCU on my UP machines. It is, in fact, the only
option.

Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

2012-11-13 17:08:31

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 09:46:20AM -0500, Nick Bowler wrote:
> On 2012-11-12 16:49 -0800, Paul E. McKenney wrote:
> > Hello!
> >
> > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> > was not a viable option (in contrast, the people running Linux on
> > tiny-memmory systems typically use TINY_RCU). Of course, if no one
> > really needs it, the proper thing to do is to remove it.
> >
> > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> > remove it, probably in the 3.9 timeframe.
>
> Yes, I use TINY_PREEMPT_RCU on my UP machines. It is, in fact, the only
> option.

Suppose that TREE_PREEMPT_RCU was available for !SMP && PREEMPT builds.
Would that work for you?

Thanx, Paul

2012-11-13 17:56:59

by Nick Bowler

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On 2012-11-13 09:08 -0800, Paul E. McKenney wrote:
> On Tue, Nov 13, 2012 at 09:46:20AM -0500, Nick Bowler wrote:
> > On 2012-11-12 16:49 -0800, Paul E. McKenney wrote:
> > > Hello!
> > >
> > > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> > > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> > > was not a viable option (in contrast, the people running Linux on
> > > tiny-memmory systems typically use TINY_RCU). Of course, if no one
> > > really needs it, the proper thing to do is to remove it.
> > >
> > > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> > > remove it, probably in the 3.9 timeframe.
> >
> > Yes, I use TINY_PREEMPT_RCU on my UP machines. It is, in fact, the only
> > option.
>
> 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...

As a side note, I wonder why any of these RCU implementations are
user-seclectable options in the first place? It looks like you will
only ever have one choice, since the dependencies all seem mutually
exclusive:

TREE_RCU depends on !PREEMPT && SMP
TREE_PREEMPT_RCU depends on PREEMPT && SMP
TINY_RCU depends on !PREEMPT && !SMP
TINY_PREEMPT_RCU depends on PREEMPT && !SMP

Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

2012-11-13 20:29:50

by Tim Sander

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

Hi Paul
> I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> was not a viable option (in contrast, the people running Linux on
> tiny-memmory systems typically use TINY_RCU). Of course, if no one
> really needs it, the proper thing to do is to remove it.
>
> So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> remove it, probably in the 3.9 timeframe.
I am using TINY_PREEMPT_RCU on the i.mx35 platform. I am currently on 3.4-rt
since the 3.6 compile failed due to for my config? Some strange device tree
stuff which i haven't had the time to figure out why.

Best regards
Tim

2012-11-13 21:21:05

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 12:56:54PM -0500, Nick Bowler wrote:
> On 2012-11-13 09:08 -0800, Paul E. McKenney wrote:
> > On Tue, Nov 13, 2012 at 09:46:20AM -0500, Nick Bowler wrote:
> > > On 2012-11-12 16:49 -0800, Paul E. McKenney wrote:
> > > > Hello!
> > > >
> > > > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> > > > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> > > > was not a viable option (in contrast, the people running Linux on
> > > > tiny-memmory systems typically use TINY_RCU). Of course, if no one
> > > > really needs it, the proper thing to do is to remove it.
> > > >
> > > > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> > > > remove it, probably in the 3.9 timeframe.
> > >
> > > Yes, I use TINY_PREEMPT_RCU on my UP machines. It is, in fact, the only
> > > option.
> >
> > 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? How much memory does your device have, if I may ask?

> As a side note, I wonder why any of these RCU implementations are
> user-seclectable options in the first place? It looks like you will
> only ever have one choice, since the dependencies all seem mutually
> exclusive:
>
> TREE_RCU depends on !PREEMPT && SMP
> TREE_PREEMPT_RCU depends on PREEMPT && SMP
> TINY_RCU depends on !PREEMPT && !SMP
> TINY_PREEMPT_RCU depends on PREEMPT && !SMP

Inertia on my part. ;-)

Thanx, Paul

2012-11-13 21:28:25

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 09:22:29PM +0100, Tim Sander wrote:
> Hi Paul
> > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I
> > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU
> > was not a viable option (in contrast, the people running Linux on
> > tiny-memmory systems typically use TINY_RCU). Of course, if no one
> > really needs it, the proper thing to do is to remove it.
> >
> > So, if you need TINY_PREEMPT_RCU, please let me know. Otherwise, I will
> > remove it, probably in the 3.9 timeframe.
> I am using TINY_PREEMPT_RCU on the i.mx35 platform. I am currently on 3.4-rt
> since the 3.6 compile failed due to for my config? Some strange device tree
> stuff which i haven't had the time to figure out why.

OK, how much memory does your device have?

Thanx, Paul

2012-11-13 21:47:24

by Nick Bowler

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

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...

Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

2012-11-13 22:29:57

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

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.

Thanx, Paul

2012-11-13 22:41:35

by Nick Bowler

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On 2012-11-13 14:25 -0800, Paul E. McKenney 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.

Well then TINY_PREEMPT_RCU doesn't sound all that useful for me!
Perhaps the help text could be improved... such as changing the words
"greatly reduced" to "marginally reduced" as a first step?

Is there no significant cache impact due to the larger implementation?
I don't really have the time or expertise to do measurements in this
regard, but if TREE_PREEMPT_RCU was actually a selectable option I could
at least choose it to see if anything explodes horribly...

Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

2012-11-13 23:12:58

by Paul E. McKenney

[permalink] [raw]
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 <
> [email protected]> 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

2012-11-13 23:32:26

by Tim Sander

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

Hi Paul

Sorry english somehow i tried to shoehorn more than one sentence into one
sentence in the last mail.
> OK, how much memory does your device have?
It's 128Mb of memory.

Best regards
Tim

2012-11-14 00:22:58

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Wed, Nov 14, 2012 at 12:32:36AM +0100, Tim Sander wrote:
> Hi Paul
>
> Sorry english somehow i tried to shoehorn more than one sentence into one
> sentence in the last mail.
> > OK, how much memory does your device have?
> It's 128Mb of memory.

That is a bit on the smaller side. But still quite large compared
to the 15K difference between CONFIG_TREE_PREEMPT_RCU and
CONFIG_TINY_PREEMPT_RCU.

Thanx, Paul

2012-11-14 00:25:15

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 05:40:40PM -0500, Nick Bowler wrote:
> On 2012-11-13 14:25 -0800, Paul E. McKenney 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.
>
> Well then TINY_PREEMPT_RCU doesn't sound all that useful for me!
> Perhaps the help text could be improved... such as changing the words
> "greatly reduced" to "marginally reduced" as a first step?
>
> Is there no significant cache impact due to the larger implementation?
> I don't really have the time or expertise to do measurements in this
> regard, but if TREE_PREEMPT_RCU was actually a selectable option I could
> at least choose it to see if anything explodes horribly...

Indeed, if I do this, the first step would be to re-introduce the
choice between CONFIG_TREE_PREEMPT_RCU and CONFIG_TINY_PREEMPT_RCU
so that you could check for horrible explosions. If the past is
any guide, there would be at least a few. ;-)

Thanx, Paul

2012-11-14 00:36:52

by Josh Triplett

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 04:06:48PM -0800, Paul E. McKenney wrote:
> On Wed, Nov 14, 2012 at 12:32:36AM +0100, Tim Sander wrote:
> > Hi Paul
> >
> > Sorry english somehow i tried to shoehorn more than one sentence into one
> > sentence in the last mail.
> > > OK, how much memory does your device have?
> > It's 128Mb of memory.
>
> That is a bit on the smaller side. But still quite large compared
> to the 15K difference between CONFIG_TREE_PREEMPT_RCU and
> CONFIG_TINY_PREEMPT_RCU.

I'd also expect CONFIG_TINY_PREEMPT_RCU to have marginally more
performance on a UP system, but probably not enough to matter.

- Josh Triplett

2012-11-14 01:14:11

by Paul E. McKenney

[permalink] [raw]
Subject: Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

On Tue, Nov 13, 2012 at 04:36:42PM -0800, Josh Triplett wrote:
> On Tue, Nov 13, 2012 at 04:06:48PM -0800, Paul E. McKenney wrote:
> > On Wed, Nov 14, 2012 at 12:32:36AM +0100, Tim Sander wrote:
> > > Hi Paul
> > >
> > > Sorry english somehow i tried to shoehorn more than one sentence into one
> > > sentence in the last mail.
> > > > OK, how much memory does your device have?
> > > It's 128Mb of memory.
> >
> > That is a bit on the smaller side. But still quite large compared
> > to the 15K difference between CONFIG_TREE_PREEMPT_RCU and
> > CONFIG_TINY_PREEMPT_RCU.
>
> I'd also expect CONFIG_TINY_PREEMPT_RCU to have marginally more
> performance on a UP system, but probably not enough to matter.

Agreed, I would expect this to be down in the noise.

Thanx, Paul