linux-hexagon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: Peter Zijlstra <peterz@infradead.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Matthew Wilcox <willy@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ankur Arora <ankur.a.arora@oracle.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	juri.lelli@redhat.com,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Mel Gorman <mgorman@suse.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Juergen Gross <jgross@suse.com>,
	andrew.cooper3@citrix.com,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux
Subject: Re: Arches that don't support PREEMPT
Date: Thu, 21 Sep 2023 08:20:38 -0400	[thread overview]
Message-ID: <020d4d23-ee7e-49aa-9ed5-1bde21fd0a5d@app.fastmail.com> (raw)
In-Reply-To: <20230919141627.GB39281@noisy.programming.kicks-ass.net>

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

  parent reply	other threads:[~2023-09-21 12:20 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87edj64rj1.fsf@oracle.com>
     [not found] ` <CAHk-=wi0bXpgULVVLc2AdJcta-fvQP7yyFQ_JtaoHUiPrqf--A@mail.gmail.com>
     [not found]   ` <87zg1u1h5t.fsf@oracle.com>
     [not found]     ` <CAHk-=whMkp68vNxVn1H3qe_P7n=X2sWPL9kvW22dsvMFH8FcQQ@mail.gmail.com>
     [not found]       ` <20230911150410.GC9098@noisy.programming.kicks-ass.net>
     [not found]         ` <87h6o01w1a.fsf@oracle.com>
     [not found]           ` <20230912082606.GB35261@noisy.programming.kicks-ass.net>
     [not found]             ` <87cyyfxd4k.ffs@tglx>
     [not found]               ` <CAHk-=whnwC01m_1f-gaM1xbvvwzwTiKitrWniA-ChZv+bM03dg@mail.gmail.com>
     [not found]                 ` <87led2wdj0.ffs@tglx>
2023-09-19 13:00                   ` Arches that don't support PREEMPT Matthew Wilcox
2023-09-19 13:34                     ` Geert Uytterhoeven
2023-09-19 13:37                     ` John Paul Adrian Glaubitz
2023-09-19 13:42                       ` Peter Zijlstra
2023-09-19 13:48                         ` John Paul Adrian Glaubitz
2023-09-19 14:16                           ` Peter Zijlstra
2023-09-19 14:24                             ` John Paul Adrian Glaubitz
2023-09-19 14:32                               ` Matthew Wilcox
2023-09-19 15:31                                 ` Steven Rostedt
2023-09-20 14:38                             ` Anton Ivanov
2023-09-21 12:20                             ` Arnd Bergmann [this message]
2023-09-19 14:17                           ` Thomas Gleixner
2023-09-19 14:50                             ` H. Peter Anvin
2023-09-19 14:57                               ` Matt Turner
2023-09-19 17:09                               ` Ulrich Teichert
2023-09-19 17:25                           ` Linus Torvalds
2023-09-19 17:58                             ` John Paul Adrian Glaubitz
2023-09-19 18:31                             ` Thomas Gleixner
2023-09-19 18:38                               ` Steven Rostedt
2023-09-19 18:52                                 ` Linus Torvalds
2023-09-19 19:53                                   ` Thomas Gleixner
2023-09-20  7:32                                 ` Ingo Molnar
2023-09-20  7:29                               ` Ingo Molnar
2023-09-20  8:26                             ` Thomas Gleixner
2023-09-20 10:37                             ` David Laight
2023-09-19 14:21                         ` Anton Ivanov
2023-09-19 15:17                           ` Thomas Gleixner
2023-09-19 15:21                             ` Anton Ivanov
2023-09-19 16:22                               ` Richard Weinberger
2023-09-19 16:41                                 ` Anton Ivanov
2023-09-19 17:33                                   ` Thomas Gleixner
2023-10-06 14:51                     ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=020d4d23-ee7e-49aa-9ed5-1bde21fd0a5d@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=ankur.a.arora@oracle.com \
    --cc=bharata@amd.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=jon.grimm@amd.com \
    --cc=juri.lelli@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=raghavendra.kt@amd.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vincent.guittot@linaro.org \
    --cc=willy@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).