[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201009102009.GK2628@hirez.programming.kicks-ass.net>
Date: Fri, 9 Oct 2020 12:20:09 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Michal Hocko <mhocko@...e.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Frederic Weisbecker <fweisbecker@...e.de>,
LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...e.de>, Ingo Molnar <mingo@...hat.com>
Subject: Re: [RFC PATCH] kernel: allow to configure PREEMPT_NONE,
PREEMPT_VOLUNTARY on kernel command line
On Fri, Oct 09, 2020 at 12:14:05PM +0200, Michal Hocko wrote:
> On Fri 09-10-20 11:47:41, Peter Zijlstra wrote:
> > That is, work backwards (from PREEMPT back to VOLUNTARY) instead of the
> > other way around.
>
> My original idea was that the config would only define the default
> preemption mode. preempt_none parameter would then just act as an
> override. That would mean that CONFIG_PREEMPTION would be effectively
> gone from the kernel. The reason being that any code outside of the
> scheduler shouldn't really care about the preemption mode. I suspect
> this will prevent from dubious hacks and provide a more robust code in
> the end.
Sure; but the way of arriving at that destination might be easier if
you work backwards from PREEMPT=y, because while there _should_ not be
dependencies outside of the scheduler, we both know there are.
This also makes your patches independent of the series that makes
CONFIG_PREEMPTION unconditional.
It also gives Kconfig space to limit the dynamic thing to archs that
have sufficient support (we'll be relying on static_call/static_branch,
and not everybody has that implemented in a way that makes it the
dynamic change worth-while).
Powered by blists - more mailing lists