Mailing List Archive

Can I disable PREMPT_RCU?
Hi,
I've been having a problem with new versions of Virtualbox hanging
my system completely, but only if I use the CONFIG_PREEMPT option.
I.e. - Preemptable Kernel (Low Latency Desktop) The problem does not
occur if I select Voluntary Preemption.

The Oracle guys who do Virtualbox development has asked me to try
full preempt but disable the PREEMPT_RCU option as a test. I think
possibly Paul McKenney works on the RCU stuff and also frequenct this
list so possibly he or someone else here can tell me where I find the
option to completely disable the RCU stuff. (If it exists...)

I'm currently running gentoo-sources-3.10.19, trying to build 3.10.20.

Specifically, here's where I am now:

c2RAID6 linux # cat .config | grep PREEMPT
CONFIG_TREE_PREEMPT_RCU=y
CONFIG_PREEMPT_RCU=y
CONFIG_PREEMPT_NOTIFIERS=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_DEBUG_PREEMPT=y
c2RAID6 linux #

I found General Setup-> RCU Subsystem but I'm ot clear what option
might allow me to do what I think the Oracle devs are asking me to do.

If I need a newer/different kernel let me know.

Thanks,
Mark
Re: Can I disable PREMPT_RCU? [ In reply to ]
Am 21.11.2013 20:52, schrieb Mark Knecht:
> Hi,
> I've been having a problem with new versions of Virtualbox hanging
> my system completely, but only if I use the CONFIG_PREEMPT option.
> I.e. - Preemptable Kernel (Low Latency Desktop) The problem does not
> occur if I select Voluntary Preemption.
>
> The Oracle guys who do Virtualbox development has asked me to try
> full preempt but disable the PREEMPT_RCU option as a test. I think
> possibly Paul McKenney works on the RCU stuff and also frequenct this
> list so possibly he or someone else here can tell me where I find the
> option to completely disable the RCU stuff. (If it exists...)
>
> I'm currently running gentoo-sources-3.10.19, trying to build 3.10.20.
>
> Specifically, here's where I am now:
>
> c2RAID6 linux # cat .config | grep PREEMPT
> CONFIG_TREE_PREEMPT_RCU=y
> CONFIG_PREEMPT_RCU=y
> CONFIG_PREEMPT_NOTIFIERS=y
> # CONFIG_PREEMPT_NONE is not set
> # CONFIG_PREEMPT_VOLUNTARY is not set
> CONFIG_PREEMPT=y
> CONFIG_PREEMPT_COUNT=y
> CONFIG_DEBUG_PREEMPT=y
> c2RAID6 linux #
>
> I found General Setup-> RCU Subsystem but I'm ot clear what option
> might allow me to do what I think the Oracle devs are asking me to do.
>
> If I need a newer/different kernel let me know.
>
> Thanks,
> Mark
>
>
make menuconfig
hit slash
type in RCU

it will tell you where to find stuff
Re: Can I disable PREMPT_RCU? [ In reply to ]
On Fri, Nov 22, 2013 at 3:13 AM, Volker Armin Hemmann
<volkerarmin@googlemail.com> wrote:
> Am 21.11.2013 20:52, schrieb Mark Knecht:
>> Hi,
>> I've been having a problem with new versions of Virtualbox hanging
>> my system completely, but only if I use the CONFIG_PREEMPT option.
>> I.e. - Preemptable Kernel (Low Latency Desktop) The problem does not
>> occur if I select Voluntary Preemption.
>>
>> The Oracle guys who do Virtualbox development has asked me to try
>> full preempt but disable the PREEMPT_RCU option as a test. I think
>> possibly Paul McKenney works on the RCU stuff and also frequenct this
>> list so possibly he or someone else here can tell me where I find the
>> option to completely disable the RCU stuff. (If it exists...)
>>
>> I'm currently running gentoo-sources-3.10.19, trying to build 3.10.20.
>>
>> Specifically, here's where I am now:
>>
>> c2RAID6 linux # cat .config | grep PREEMPT
>> CONFIG_TREE_PREEMPT_RCU=y
>> CONFIG_PREEMPT_RCU=y
>> CONFIG_PREEMPT_NOTIFIERS=y
>> # CONFIG_PREEMPT_NONE is not set
>> # CONFIG_PREEMPT_VOLUNTARY is not set
>> CONFIG_PREEMPT=y
>> CONFIG_PREEMPT_COUNT=y
>> CONFIG_DEBUG_PREEMPT=y
>> c2RAID6 linux #
>>
>> I found General Setup-> RCU Subsystem but I'm ot clear what option
>> might allow me to do what I think the Oracle devs are asking me to do.
>>
>> If I need a newer/different kernel let me know.
>>
>> Thanks,
>> Mark
>>
>>
> make menuconfig
> hit slash
> type in RCU
>
> it will tell you where to find stuff
>
>

And the only thing that I see that looks like a candidate says

Symbol: PREEMPT_RCU [=y]
│
│ Type : boolean
│
│ Defined at init/Kconfig:472

which doesn't give me any option to change it in make menuconfig.

If you feel a different option is in there that I'm not seeing I'd
certainly appreciate knowing which one it is.

Under General Setup -> RCU Subsystem using a ? on each line suggests
none of the lines in that section are associated with PREEMPT_RCU. As
you seem to know where it is please let me know.

Thanks,
Mark
Re: Can I disable PREMPT_RCU? [ In reply to ]
Am 22.11.2013 17:06, schrieb Mark Knecht:
> On Fri, Nov 22, 2013 at 3:13 AM, Volker Armin Hemmann
> <volkerarmin@googlemail.com> wrote:
>> Am 21.11.2013 20:52, schrieb Mark Knecht:
>>> Hi,
>>> I've been having a problem with new versions of Virtualbox hanging
>>> my system completely, but only if I use the CONFIG_PREEMPT option.
>>> I.e. - Preemptable Kernel (Low Latency Desktop) The problem does not
>>> occur if I select Voluntary Preemption.
>>>
>>> The Oracle guys who do Virtualbox development has asked me to try
>>> full preempt but disable the PREEMPT_RCU option as a test. I think
>>> possibly Paul McKenney works on the RCU stuff and also frequenct this
>>> list so possibly he or someone else here can tell me where I find the
>>> option to completely disable the RCU stuff. (If it exists...)
>>>
>>> I'm currently running gentoo-sources-3.10.19, trying to build 3.10.20.
>>>
>>> Specifically, here's where I am now:
>>>
>>> c2RAID6 linux # cat .config | grep PREEMPT
>>> CONFIG_TREE_PREEMPT_RCU=y
>>> CONFIG_PREEMPT_RCU=y
>>> CONFIG_PREEMPT_NOTIFIERS=y
>>> # CONFIG_PREEMPT_NONE is not set
>>> # CONFIG_PREEMPT_VOLUNTARY is not set
>>> CONFIG_PREEMPT=y
>>> CONFIG_PREEMPT_COUNT=y
>>> CONFIG_DEBUG_PREEMPT=y
>>> c2RAID6 linux #
>>>
>>> I found General Setup-> RCU Subsystem but I'm ot clear what option
>>> might allow me to do what I think the Oracle devs are asking me to do.
>>>
>>> If I need a newer/different kernel let me know.
>>>
>>> Thanks,
>>> Mark
>>>
>>>
>> make menuconfig
>> hit slash
>> type in RCU
>>
>> it will tell you where to find stuff
>>
>>
> And the only thing that I see that looks like a candidate says
>
> Symbol: PREEMPT_RCU [=y]
> │
> │ Type : boolean
> │
> │ Defined at init/Kconfig:472
>
> which doesn't give me any option to change it in make menuconfig.
no, that means it is turned on by some other option.

maybe you should use grep.
Re: Can I disable PREMPT_RCU? [ In reply to ]
On Fri, Nov 22, 2013 at 11:21 AM, Volker Armin Hemmann
<volkerarmin@googlemail.com> wrote:
<SNIP>
>> which doesn't give me any option to change it in make menuconfig.
> no, that means it is turned on by some other option.
>
> maybe you should use grep.

Geez...
Re: Can I disable PREMPT_RCU? [ In reply to ]
Hey Mark,

/usr/src/linux/init/Kconfig and kernel/Kconfig.preempt are the droids you
are looking for...

config PREEMPT_RCU
def_bool TREE_PREEMPT_RCU
help
This option enables preemptible-RCU code that is common between
the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.

So you would want to /not/ pick one of those - however - looking further

choice
prompt "RCU Implementation"
default TREE_RCU

config TREE_RCU
bool "Tree-based hierarchical RCU"
depends on !PREEMPT && SMP
select IRQ_WORK
help
This option selects the RCU implementation that is
designed for very large SMP system with hundreds or
thousands of CPUs. It also scales down nicely to
smaller systems.

config TREE_PREEMPT_RCU
bool "Preemptible tree-based hierarchical RCU"
depends on PREEMPT
select IRQ_WORK
help
This option selects the RCU implementation that is
designed for very large SMP systems with hundreds or
thousands of CPUs, but for which real-time response
is also required. It also scales down nicely to
smaller systems.

Select this option if you are unsure.

config TINY_RCU
bool "UP-only small-memory-footprint RCU"
depends on !PREEMPT && !SMP
help
This option selects the RCU implementation that is
designed for UP systems from which real-time response
is not required. This option greatly reduces the
memory footprint of RCU.

endchoice

Seems you would want TREE_RCU (or TINY_RCU if you really have a UP system)
- but both of those depend on !PREEMPT... which is counter to what you were
asked.

In short - at least in 3.12.0 - I don't think what you've been asked for is
in fact possible - or I'm reading Kconfig wrongly (it's been a while)

Cheers,
malc.




On Fri, Nov 22, 2013 at 7:40 PM, Mark Knecht <markknecht@gmail.com> wrote:

> On Fri, Nov 22, 2013 at 11:21 AM, Volker Armin Hemmann
> <volkerarmin@googlemail.com> wrote:
> <SNIP>
> >> which doesn't give me any option to change it in make menuconfig.
> > no, that means it is turned on by some other option.
> >
> > maybe you should use grep.
>
> Geez...
>
>
Re: Can I disable PREMPT_RCU? [ In reply to ]
On Fri, Nov 22, 2013 at 12:36 PM, malc <mlashley@gmail.com> wrote:
> Hey Mark,
>
> /usr/src/linux/init/Kconfig and kernel/Kconfig.preempt are the droids you
> are looking for...
>
> config PREEMPT_RCU
> def_bool TREE_PREEMPT_RCU
> help
> This option enables preemptible-RCU code that is common between
> the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations.
>
> So you would want to /not/ pick one of those - however - looking further
>
> choice
> prompt "RCU Implementation"
> default TREE_RCU
>
> config TREE_RCU
> bool "Tree-based hierarchical RCU"
> depends on !PREEMPT && SMP
> select IRQ_WORK
> help
> This option selects the RCU implementation that is
> designed for very large SMP system with hundreds or
> thousands of CPUs. It also scales down nicely to
> smaller systems.
>
> config TREE_PREEMPT_RCU
> bool "Preemptible tree-based hierarchical RCU"
> depends on PREEMPT
> select IRQ_WORK
> help
> This option selects the RCU implementation that is
> designed for very large SMP systems with hundreds or
> thousands of CPUs, but for which real-time response
> is also required. It also scales down nicely to
> smaller systems.
>
> Select this option if you are unsure.
>
> config TINY_RCU
> bool "UP-only small-memory-footprint RCU"
> depends on !PREEMPT && !SMP
> help
> This option selects the RCU implementation that is
> designed for UP systems from which real-time response
> is not required. This option greatly reduces the
> memory footprint of RCU.
>
> endchoice
>
> Seems you would want TREE_RCU (or TINY_RCU if you really have a UP system) -
> but both of those depend on !PREEMPT... which is counter to what you were
> asked.
>
> In short - at least in 3.12.0 - I don't think what you've been asked for is
> in fact possible - or I'm reading Kconfig wrongly (it's been a while)
>
> Cheers,
> malc.
>

Thanks malc. I really appreciate your efforts to go through that.

I think I'm going to throw this back to Oracle for now. RCU has been
in the kernel for a long time as best I can tell. I tried a number of
kernels going back to 3.7.10 through 3.10.20. The older 4.2.x versions
of Virtualbox had no problem on any of the kernels I tested. All of
the 4.3 versions cause this lock up and I'm far from being the only
person who's seen it so if it was something really wrong with the RCU
preempt stuff I think some other app would have had the problem also.
I don't really believe it's a kernel problem but rather that the VB
developers have messed something up and they're just hoping I can
point them in the right direction.

Again, THANKS for the help!

Cheers,
Mark