From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Johannes Weiner <hannes@cmpxchg.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Suren Baghdasaryan <surenb@google.com>,
<linux-kernel@vger.kernel.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Klaus Kudielka <klaus.kudielka@gmail.com>,
Chris Bainbridge <chris.bainbridge@gmail.com>,
"Linux regression tracking (Thorsten Leemhuis)"
<regressions@leemhuis.info>,
"Gautham R. Shenoy" <gautham.shenoy@amd.com>,
Youssef Esmat <youssefesmat@google.com>,
Paul Menzel <pmenzel@molgen.mpg.de>,
"Bert Karwatzki" <spasswolf@web.de>,
<regressions@lists.linux.dev>
Subject: Re: [PATCH 3/3] sched/core: Indicate a sched_delayed task was migrated before wakeup
Date: Tue, 15 Oct 2024 08:41:32 +0530 [thread overview]
Message-ID: <2b211cf7-4800-564d-d39c-8013081afee0@amd.com> (raw)
In-Reply-To: <20241014144358.GB1021@cmpxchg.org>
Hello Johannes,
On 10/14/2024 8:13 PM, Johannes Weiner wrote:
> On Fri, Oct 11, 2024 at 12:39:58PM +0200, Peter Zijlstra wrote:
>> On Fri, Oct 11, 2024 at 06:08:03AM -0400, Johannes Weiner wrote:
>>> Completely untested. But if it looks good, I'll send a proper patch.
>>
>> Sure. Thanks for doing this.
>
> Ok here goes. Built, booted and runtime-tested.
>
> ---
>
> From 91f230caa0119877cb861047e1af1371bf00d908 Mon Sep 17 00:00:00 2001
> From: Johannes Weiner <hannes@cmpxchg.org>
> Date: Fri, 11 Oct 2024 06:18:07 -0400
> Subject: [PATCH] sched: psi: pass enqueue/dequeue flags to psi callbacks
> directly
>
> What psi needs to do on each enqueue and dequeue has gotten more
> subtle, and the generic sched code trying to distill this into a bool
> for the callbacks is awkward.
>
> Pass the flags directly and let psi parse them. For that to work, the
> #include "stats.h" (which has the psi callback implementations) needs
> to be below the flag definitions in "sched.h". Move that section
> further down, next to some of the other accounting stuff.
>
> This also puts the ENQUEUE_SAVE/RESTORE branch behind the psi jump
> label, slightly reducing overhead when PSI=y but runtime disabled.
>
> Link: https://lore.kernel.org/lkml/20241011083323.GL17263@noisy.programming.kicks-ass.net/
> Suggested-by: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
I tested this series on top of tip:sched/urgent at commit cd9626e9ebc7
("sched/fair: Fix external p->on_rq users") and did not observe any
splats related to PSI or otherwise. Please feel free to add:
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
--
Thanks and Regards,
Prateek
> ---
> kernel/sched/core.c | 12 +++++-----
> kernel/sched/sched.h | 56 ++++++++++++++++++++++----------------------
> kernel/sched/stats.h | 29 +++++++++++++++--------
> 3 files changed, 53 insertions(+), 44 deletions(-)
>
> [..snip..]
next prev parent reply other threads:[~2024-10-15 3:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 8:28 [PATCH 0/3] sched/core: Fix PSI inconsistent task state splats with DELAY_DEQUEUE K Prateek Nayak
2024-10-10 8:28 ` [PATCH 1/3] sched/core: Dequeue PSI signals for blocked tasks that are delayed K Prateek Nayak
2024-10-10 19:23 ` Johannes Weiner
2024-10-10 8:28 ` [PATCH 2/3] sched/core: Add ENQUEUE_WAKEUP flag alongside ENQUEUE_DELAYED K Prateek Nayak
2024-10-10 8:28 ` [PATCH 3/3] sched/core: Indicate a sched_delayed task was migrated before wakeup K Prateek Nayak
2024-10-10 13:03 ` Johannes Weiner
2024-10-10 13:06 ` Peter Zijlstra
2024-10-10 19:37 ` Johannes Weiner
2024-10-11 3:31 ` K Prateek Nayak
2024-10-11 8:33 ` Peter Zijlstra
2024-10-11 10:08 ` Johannes Weiner
2024-10-11 10:39 ` Peter Zijlstra
2024-10-14 14:43 ` Johannes Weiner
2024-10-15 3:11 ` K Prateek Nayak [this message]
2024-10-28 13:28 ` [tip: sched/core] sched: psi: pass enqueue/dequeue flags to psi callbacks directly tip-bot2 for Johannes Weiner
2024-10-12 14:15 ` [tip: sched/urgent] Since sched_delayed tasks remain queued even after blocking, the load tip-bot2 for Johannes Weiner
2024-10-14 7:28 ` [tip: sched/urgent] sched/psi: Fix mistaken CPU pressure indication after corrupted task state bug tip-bot2 for Johannes Weiner
2024-10-10 15:59 ` [PATCH 3/3] sched/core: Indicate a sched_delayed task was migrated before wakeup K Prateek Nayak
2024-10-10 10:47 ` [PATCH 0/3] sched/core: Fix PSI inconsistent task state splats with DELAY_DEQUEUE Peter Zijlstra
2024-10-10 10:57 ` K Prateek Nayak
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=2b211cf7-4800-564d-d39c-8013081afee0@amd.com \
--to=kprateek.nayak@amd.com \
--cc=bsegall@google.com \
--cc=chris.bainbridge@gmail.com \
--cc=dietmar.eggemann@arm.com \
--cc=gautham.shenoy@amd.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=klaus.kudielka@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pmenzel@molgen.mpg.de \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
--cc=rostedt@goodmis.org \
--cc=spasswolf@web.de \
--cc=surenb@google.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=youssefesmat@google.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
all inboxes | Powered by JetHome®