From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Benjamin Segall <bsegall@google.com>, Daehyeon Ko <4ncienth@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Aaron Lu <ziqianlu@bytedance.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched/fair: Clear throttle state when leaving the fair class
Date: Thu, 29 Oct 2026 09:09:09 +0530 [thread overview]
Message-ID: <725e7cc3-711c-4afd-8fb0-78f79d45de7d@amd.com> (raw)
In-Reply-To: <xm26ecd9ihv8.fsf@google.com>
Hello Ben,
On 10/29/2026 3:54 AM, Benjamin Segall wrote:
> Yep, sched_class switch lets you smuggle ->throttled into
> !cfs_bandwidth_used(), and then that check on enqueue_throttled lets you
> smuggle it onto actually being enqueued, which leads to corruption.
> That's fun.
>
> I think we need to use switched_from_fair though - if we are currently
> TASK_ON_RQ_MIGRATING, sched_class changes will skip going into
> dequeue_task_fair at all, so we will not see the DEQUEUE_CLASS.
> Triggering a migration on a throttled task can still happen I'm fairly
> sure.
We cannot grab the task_rq_lock() when the task is ON_RQ_MIGRATING and
guard(sched_change) should never see TASK_ON_RQ_MIGRATING - the task is
either fully blocked (!p->on_rq) or is queued (p->on_rq = 1) on a CPU
when we are doing a class change.
--
Thanks and Regards,
Prateek
prev parent reply other threads:[~2026-10-29 3:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 23:52 Daehyeon Ko
2026-10-23 11:52 ` Aaron Lu
2026-10-28 22:24 ` Benjamin Segall
2026-10-29 3:27 ` Aaron Lu
2026-10-29 3:39 ` K Prateek Nayak [this message]
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=725e7cc3-711c-4afd-8fb0-78f79d45de7d@amd.com \
--to=kprateek.nayak@amd.com \
--cc=4ncienth@gmail.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=ziqianlu@bytedance.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®