mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Qais Yousef <qyousef@layalina.io>
Cc: Christian Loehle <christian.loehle@arm.com>,
	Ingo Molnar <mingo@kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Stultz <jstultz@google.com>,
	linux-kernel@vger.kernel.org, Wei Wang <wvw@google.com>
Subject: Re: [PATCH v4 1/2] sched/uclamp: Fix race condition leading to imbalanced uclamp_rq
Date: Fri, 30 Oct 2026 13:15:18 +0100	[thread overview]
Message-ID: <20261030121518.GE1813469@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20261030112825.z7k57twgua27p2vu@airbuntu>

On Fri, Oct 30, 2026 at 11:28:25AM +0000, Qais Yousef wrote:

> Peter/Vincent, what do you think? It seems we have a schrodenger task that is
> both enqueued and dequeued simultaneously in these throttling paths. Shouldn't
> this be fixed? If yes, any thoughts on the right approach? Should we throttle
> if there are no other tasks on the rq too? I didn't realize the semantics are
> that strong for enforcing the quota.

Urgh, nothing is ever straight forward is it ...

Bah, so this is because the core does uclamp (for classes that have it
on) but then the class does the throttle without going through the core
{en,de}queue.

Does it make sense to have throttle_Cfs_rq_work() and tg_unthrottle_up()
do uclamp_rq_{dec,inc}() respectively, along with the
{de,en}queue_task_fair() they're already doing?

  reply	other threads:[~2026-10-30 12:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 13:13 [PATCH v4 0/2] Fix uclamp race against non atomic static key enable Qais Yousef
2026-10-29 13:13 ` [PATCH v4 1/2] sched/uclamp: Fix race condition leading to imbalanced uclamp_rq Qais Yousef
2026-10-29 15:58   ` Christian Loehle
2026-10-29 23:43     ` Qais Yousef
2026-10-30 10:50       ` Christian Loehle
2026-10-30 11:28         ` Qais Yousef
2026-10-30 12:15           ` Peter Zijlstra [this message]
2026-10-30 12:41             ` Qais Yousef
2026-10-30 13:21               ` Christian Loehle
2026-10-30 14:13                 ` Peter Zijlstra
2026-10-29 13:13 ` [PATCH v4 2/2] sched/uclamp: Use wrappers instead of open coding UCLAMP_FLAG_IDLE Qais Yousef
2026-10-30 14:57   ` Kayra Cizmeci

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=20261030121518.GE1813469@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=qyousef@layalina.io \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=wvw@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®