From: Peter Zijlstra <peterz@infradead.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Chris Mason <clm@meta.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
vschneid@redhat.com, Juri Lelli <juri.lelli@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: scheduler performance regression since v6.11
Date: Wed, 21 May 2025 17:02:07 +0200 [thread overview]
Message-ID: <20250521150207.GD24938@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <5cf1790a-3eed-4c0a-8a31-b3802c5d9b35@arm.com>
On Wed, May 21, 2025 at 04:02:46PM +0200, Dietmar Eggemann wrote:
> On 20/05/2025 21:38, Peter Zijlstra wrote:
> > On Tue, May 20, 2025 at 04:38:09PM +0200, Dietmar Eggemann wrote:
> >
> >> 3840cbe24cf0 - sched: psi: fix bogus pressure spikes from aggregation race
> >>
> >> With CONFIG_PSI enabled we call cpu_clock(cpu) now multiple times (up to
> >> 4 times per task switch in my setup) in:
> >>
> >> __schedule() -> psi_sched_switch() -> psi_task_switch() ->
> >> psi_group_change().
> >>
> >> There seems to be another/other v6.12 related patch(es) later which
> >> cause(s) another 4% regression I yet have to discover.
> >
> > Urgh, let me add this to the pile to look at. Thanks!
>
> Not sure how expensive 'cpu_clock(cpu)' is on bare-metal.
>
> But I also don't get why PSI needs per group 'now' values when we
> iterate over cgroup levels?
IIUC the read side does something like:
real-read + guestimate(now, read-time);
And if the time-stamp is from before the write_seqcount_begin(), the
guestimate part goes side-ways.
My 'fix' is fairly simple straight forward brute force, but ideally this
whole thing gets some actual thinking done -- but my brain is fried from
staring at the wakeup path too long and I need to do simple things for a
few days ;-)
next prev parent reply other threads:[~2025-05-21 15:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 23:13 scheduler performance regression since v6.11 Chris Mason
2025-05-09 19:49 ` Peter Zijlstra
2025-05-12 18:08 ` Peter Zijlstra
2025-05-12 19:39 ` Chris Mason
2025-05-12 22:35 ` Chris Mason
2025-05-13 7:15 ` Peter Zijlstra
2025-05-16 10:18 ` Peter Zijlstra
2025-05-20 14:38 ` Dietmar Eggemann
2025-05-20 14:53 ` Chris Mason
2025-05-21 13:59 ` Dietmar Eggemann
2025-05-21 14:32 ` Chris Mason
2025-05-20 19:38 ` Peter Zijlstra
2025-05-21 14:02 ` Dietmar Eggemann
2025-05-21 15:02 ` Peter Zijlstra [this message]
2025-05-21 19:00 ` Peter Zijlstra
2025-05-21 14:54 ` Peter Zijlstra
2025-05-22 8:48 ` Peter Zijlstra
2025-05-22 15:00 ` Johannes Weiner
2025-05-23 15:40 ` Peter Zijlstra
2025-05-23 12:27 ` Dietmar Eggemann
2025-07-10 12:46 ` [tip: sched/core] sched/psi: Optimize psi_group_change() cpu_clock() usage tip-bot2 for Peter Zijlstra
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=20250521150207.GD24938@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=clm@meta.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.