[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <020d4d23-ee7e-49aa-9ed5-1bde21fd0a5d@app.fastmail.com>
Date: Thu, 21 Sep 2023 08:20:38 -0400
From: "Arnd Bergmann" <arnd@...db.de>
To: "Peter Zijlstra" <peterz@...radead.org>,
"John Paul Adrian Glaubitz" <glaubitz@...sik.fu-berlin.de>
Cc: "Matthew Wilcox" <willy@...radead.org>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Linus Torvalds" <torvalds@...ux-foundation.org>,
"Ankur Arora" <ankur.a.arora@...cle.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, x86@...nel.org,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Andy Lutomirski" <luto@...nel.org>,
"Borislav Petkov" <bp@...en8.de>,
"Dave Hansen" <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, "Ingo Molnar" <mingo@...hat.com>,
juri.lelli@...hat.com,
"Vincent Guittot" <vincent.guittot@...aro.org>,
"Mel Gorman" <mgorman@...e.de>,
"Steven Rostedt" <rostedt@...dmis.org>, jon.grimm@....com,
bharata@....com, raghavendra.kt@....com,
"Boris Ostrovsky" <boris.ostrovsky@...cle.com>,
"Konrad Rzeszutek Wilk" <konrad.wilk@...cle.com>,
"Juergen Gross" <jgross@...e.com>, andrew.cooper3@...rix.com,
"Geert Uytterhoeven" <geert@...ux-m68k.org>,
linux-m68k@...ts.linux-m68k.org,
"Richard Weinberger" <richard@....at>,
"Anton Ivanov" <anton.ivanov@...bridgegreys.com>,
"Johannes Berg" <johannes@...solutions.net>,
linux-um@...ts.infradead.org, "Brian Cain" <bcain@...cinc.com>,
linux-hexagon@...r.kernel.org,
"Richard Henderson" <richard.henderson@...aro.org>,
"Ivan Kokshaysky" <ink@...assic.park.msu.ru>,
"Matt Turner" <mattst88@...il.com>, linux-alpha@...r.kernel.org
Subject: Re: Arches that don't support PREEMPT
On Tue, Sep 19, 2023, at 10:16, Peter Zijlstra wrote:
> On Tue, Sep 19, 2023 at 03:48:09PM +0200, John Paul Adrian Glaubitz wrote:
>> On Tue, 2023-09-19 at 15:42 +0200, Peter Zijlstra wrote:
>> > > The agreement to kill off ia64 wasn't an invitation to kill off other stuff
>> > > that people are still working on! Can we please not do this?
>> >
>> > If you're working on one of them, then surely it's a simple matter of
>> > working on adding CONFIG_PREEMPT support :-)
>>
>> As Geert poined out, I'm not seeing anything particular problematic with the
>> architectures lacking CONFIG_PREEMPT at the moment. This seems to be more
>> something about organizing KConfig files.
>
> The plan in the parent thread is to remove PREEMPT_NONE and
> PREEMPT_VOLUNTARY and only keep PREEMPT_FULL.
...
>
> PREEMPT isn't something new. Also, I don't think the arch part for
> actually supporting it is particularly hard, mostly it is sticking the
> preempt_schedule_irq() call in return from interrupt code path.
>
> If you convert the arch to generic-entry (a much larger undertaking)
> then you get this for free.
I checked the default configurations for both in-kernel targets and
general-purpose distros and was surprised to learn that very few
actually turn on full preemption by default:
- All distros I looked at (rhel, debian, opensuse) use PREEMPT_VOLUNTARY
by default, though they usually also set PREEMPT_DYNAMIC to let users
override it at boot time.
- The majority (220) of all defconfig files in the kernel don't select
any preemption options, and just get PREEMPT_NONE automatically.
This includes the generic configs for armv7, s390 and mips.
- A small number (24) set PREEMPT_VOLUNTARY, but this notably
includes x86 and ppc64. x86 is the only one of those that sets
PREEMPT_DYNAMIC
- CONFIG_PREEMPT=y (full preemption) is used on 89 defconfigs,
including arm64 and a lot of the older arm32, arc and
mips platforms.
If we want to have a chance of removing both PREEMPT_NONE and
PREEMPT_VOLUNTARY, I think we should start with changing the
defaults first, so defconfigs that don't specify anything else
get PREEMPT=y, and distros that use PREEMPT_VOLUNTARY use it
use it in the absence of a command line argument. If that
doesn't cause too many regressions, the next step might be
to hide the choice under CONFIG_EXPERT until all m68k and
alpha no longer require PREEMPT_NONE.
Arnd
Powered by blists - more mailing lists