Re: [PATCH] sched: Tweak default dynamic preempt mode selection
From: Mike Galbraith
Date: Wed Nov 10 2021 - 00:44:56 EST
On Wed, 2021-11-10 at 00:03 +0000, Valentin Schneider wrote:
> On 09/11/21 11:25, Frederic Weisbecker wrote:
> > On Fri, Nov 05, 2021 at 10:40:35AM +0000, Valentin Schneider wrote:
> > > @@ -75,17 +86,6 @@ config PREEMPT_RT
> > >
> > > endchoice
> > >
> > > -config PREEMPT_NONE
> > > - bool
> > > -
> > > -config PREEMPT_VOLUNTARY
> > > - bool
> > > -
> > > -config PREEMPT
> > > - bool
> > > - select PREEMPTION
> > > - select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
> > > -
> > > config PREEMPT_COUNT
> > > bool
> >
> > This must be breaking cond_resched() and might_resched() definitions.
> >
> > Since CONFIG_PREEMPT_NONE, CONFIG_PREEMPT_VOLUNTARY and CONFIG_PREEMPT aren't too widely
> > spread around within ifdefferies, you can:
> >
> > 1) Rename CONFIG_PREEMPT_NONE to CONFIG_PREEMPT_NONE_STATIC
> > Rename CONFIG_PREEMPT_VOLUNTARY to CONFIG_PREEMPT_VOLUNTARY_STATIC
> > Rename CONFIG_PREEMPT to CONFIG_PREEMPT_STATIC
> >
> > 2) Keep the old CONFIG_PREEMPT_NONE, CONFIG_PREEMPT_VOLUNTARY,
> > CONFIG_PREEMPT around for compatibility and make them select their
> > corresponding BEHAVIOUR entries.
> >
>
> Damn, I was too zealous on my inbox clearing and skipped that one, sorry!
> (and ofc in the meantime Mike and I went down separate rabbit holes).
>
> The old CONFIG_PREEMPT* would have to remain somewhere in the menu entry
> (e.g. "legacy" preemption mode selection?), but other than that it seems to
> work with this kind of structure:
>
> choice
> prompt "Preemption Model"
> default PREEMPT_BEHAVIOUR if PREEMPT
> default PREEMPT_VOLUNTARY_BEHAVIOUR if PREEMPT_VOLUNTARY
> default PREEMPT_NONE_BEHAVIOUR
>
> This however doesn't solve Mike's concern wrt deselecting PREEMPT_RT to
> flip PREEMPT_DYNAMIC and vice versa...
OTOH it's not quite here/now relevant, whereas your config woes are...
-Mike