[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7d940c32-0803-4571-8982-71e7f587bffb@kylinos.cn>
Date: Tue, 15 Jul 2025 14:05:01 +0800
From: Zihuan Zhang <zhangzihuan@...inos.cn>
To: K Prateek Nayak <kprateek.nayak@....com>,
Christian Loehle <christian.loehle@....com>, xuewen.yan@...soc.com,
vincent.guittot@...aro.org, mingo@...hat.com, peterz@...radead.org,
juri.lelli@...hat.com
Cc: rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
vschneid@...hat.com, hongyan.xia2@....com, linux-kernel@...r.kernel.org,
ke.wang@...soc.com, di.shen@...soc.com, xuewen.yan94@...il.com,
kuyo.chang@...iatek.com, juju.sung@...iatek.com, qyousef@...alina.io
Subject: Re: [PATCH v1] sched/uclamp: Exclude kernel threads from uclamp logic
在 2025/7/10 11:41, K Prateek Nayak 写道:
> Hello Zihuan,
>
> On 7/10/2025 6:17 AM, Zihuan Zhang wrote:
>> - For kernel threads that do not set any clamp values, skip the clamp
>> aggregation step
>>
>> - If a kernel thread explicitly sets clamp attributes, it should of
>> course remain fully visible to uclamp logic.
> There are also sched_util_clamp_{min,max} global controls via sysctl
> which can be influencing the kthread scheduling / freq behavior
> indirectly and glancing at the implementation, I think these are
> still handled by clamping in uclamp_eff_get() and effective_cpu_util()
> only looks at uclamp_rq_get() to make freq decisions.
>
> Wouldn't excluding the kthreads from the uclamp aggregation also change
> this behavior? I'm assuming these global knobs can be used to limit
> frequencies when thermal throttle is detected and be reset again once
> the SoC falls below the throttle limits?
>
Hi Prateek,
Thanks a lot for pointing this out — I hadn’t fully considered the
impact of global sched_util_clamp_{min,max} settings on kernel threads
that don’t explicitly set clamp values.
I’ll take a closer look at how this behaves in practice and carefully
rethink the approach.
Best regards,
Zihuan Zhang
Powered by blists - more mailing lists