Re: [PATCH 2/7] rcu: limit PREEMPT_RCU configurations
From: Ankur Arora
Date: Thu Oct 10 2024 - 13:36:19 EST
Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> writes:
> On 2024-10-10 10:10:32 [+0200], Peter Zijlstra wrote:
>> On Thu, Oct 10, 2024 at 08:32:07AM +0200, Sebastian Andrzej Siewior wrote:
>> > On 2024-10-09 11:24:09 [-0700], Paul E. McKenney wrote:
>> > > In order to support systems that currently run CONFIG_PREEMPT=n that
>> > …
>> > > Or am I once again missing your point?
>> >
>> > The change is:
>> > | config PREEMPT_RCU
>> > | bool
>> > |- default y if PREEMPTION
>> > |+ default y if (PREEMPT || PREEMPT_RT || PREEMPT_DYNAMIC)
>> >
>> > Now:
>> > - CONFIG_PREEMPT select PREEMPT_BUILD
>> > - PREEMPT_RT select CONFIG_PREEMPTION
>> > - PREEMPT_DYNAMIC selects PREEMPT_BUILD
>> >
>> > and PREEMPT_BUILD select CONFIG_PREEMPTION
>> >
>> > so in the end, this change is a nop, right?
>>
>> PREEMPT_RT selects PREEMPTION *and* has one of PREEMPT / PREEMPT_LAZY /
>> PREEMPT_DYNAMIC, all of which in turn select PREEMPT_BUILD, which
>> selects PREEMPTION.
>>
>> (arguably we can remove the select PREEMPTION from PREEMPT_RT)
>>
>> The proposed change is not a nop because the config: PREEMPT_LAZY=y
>> PREEMPT_DYNAMIC=n will result in false, while it will have PREEMPTION.
>
> I have a config with PREEMPT_LAZY=y PREEMPT_DYNAMIC=n and
> CONFIG_PREEMPT_RCU=y.
>
> I can't deselect CONFIG_PREEMPT_RCU=y. This is because LAZY selects
> PREEMPT_BUILD and PREEMPT_RCU selects itself once PREEMPTION is on.
That's odd. I have that exact configuration (PREEMPT_DYANMIC=n,
PREEMPT_LAZY=y, PREEMPT_RCU=n).
Can you share your .config?
Ankur
>> That said, I really do not agree with the change, it makes the condition
>> complicated for no reason.
>
> Sebastian
--
ankur