public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ritesh Harjani <ritesh.list@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
	Salvatore Dipietro <dipiets@amazon.it>,
	linux-kernel@vger.kernel.org, alisaidi@amazon.com,
	blakgeof@amazon.com, abuehaze@amazon.de,
	dipietro.salvatore@gmail.com, Thomas Gleixner <tglx@kernel.org>,
	Valentin Schneider <vschneid@redhat.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 0/1] sched: Restore PREEMPT_NONE as default
Date: Tue, 7 Apr 2026 10:20:18 +0200	[thread overview]
Message-ID: <20260407082018.GC3738010@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <1pgulz0k.ritesh.list@gmail.com>

On Sun, Apr 05, 2026 at 11:38:59AM +0530, Ritesh Harjani wrote:

> However, for curiosity, I was hoping if someone more familiar with the
> scheduler area can explain why PREEMPT_LAZY v/s PREEMPT_NONE, causes
> performance regression w/o huge pages? 
> 
> Minor page fault handling has micro-secs latency, where as sched ticks
> is in milli-secs. Besides, both preemption models should anyway
> schedule() if TIF_NEED_RESCHED is set on return to userspace, right?
> 
> So was curious to understand how is the preemption model causing
> performance regression with no hugepages in this case?

So yes, everything can schedule on return-to-user (very much including
NONE). Which is why rseq slice ext is heavily recommended for anything
attempting user space spinlocks.

The thing where the other preemption modes differ is the scheduling
while in kernel mode. So if the workload is spending significant time in
the kernel, this could cause more scheduling.

As you already mentioned, no huge pages, gives us more overhead on #PF
(and TLB miss, but that's mostly hidden in access latency rather than
immediate system time). This gives more system time, and more room to
schedule.

If we get preempted in the middle of a #PF, rather than finishing it,
this increases the #PF completion time and if userspace is trying to
access this page concurrently.... But we should see that in mmap_lock
contention/idle time :/

I'm not sure I can explain any of this.

  parent reply	other threads:[~2026-04-07  8:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 19:19 [PATCH 0/1] sched: Restore PREEMPT_NONE as default Salvatore Dipietro
2026-04-03 19:19 ` [PATCH 1/1] " Salvatore Dipietro
2026-04-03 21:32 ` [PATCH 0/1] " Peter Zijlstra
2026-04-04 17:42   ` Andres Freund
2026-04-05  1:40     ` Andres Freund
2026-04-05  4:21       ` Andres Freund
2026-04-05  6:08         ` Ritesh Harjani
2026-04-05 14:09           ` Andres Freund
2026-04-05 14:44             ` Andres Freund
2026-04-07  8:29               ` Peter Zijlstra
2026-04-07  8:27             ` Peter Zijlstra
2026-04-07 10:17             ` David Laight
2026-04-07  8:20           ` Peter Zijlstra [this message]
2026-04-07  9:07             ` Peter Zijlstra
2026-04-07 11:19         ` Mark Rutland
2026-04-07  8:49     ` Peter Zijlstra
2026-04-06  0:43   ` Qais Yousef
2026-04-05 14:44 ` Mitsumasa KONDO
2026-04-05 16:43   ` Andres Freund
2026-04-06  1:46     ` Mitsumasa KONDO

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=20260407082018.GC3738010@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=abuehaze@amazon.de \
    --cc=alisaidi@amazon.com \
    --cc=andres@anarazel.de \
    --cc=bigeasy@linutronix.de \
    --cc=blakgeof@amazon.com \
    --cc=dipietro.salvatore@gmail.com \
    --cc=dipiets@amazon.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ritesh.list@gmail.com \
    --cc=tglx@kernel.org \
    --cc=vschneid@redhat.com \
    /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