[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ae526670-5a3d-4c86-991b-3c3175f6d03d@arm.com>
Date: Wed, 19 Feb 2025 15:57:19 +0000
From: Christian Loehle <christian.loehle@....com>
To: Xuewen Yan <xuewen.yan@...soc.com>, vincent.guittot@...aro.org,
mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com
Cc: dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, hongyan.xia2@....com,
ke.wang@...soc.com, di.shen@...soc.com, xuewen.yan94@...il.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] sched/uclamp: Always using uclamp_is_used()
On 2/19/25 09:37, Xuewen Yan wrote:
> Now, we have the uclamp_is_used() func to judge the uclamp enabled,
> so replace the static_branch_unlikely(&sched_uclamp_used) with it.
>
> Signed-off-by: Xuewen Yan <xuewen.yan@...soc.com>
> Reviewed-by: Hongyan Xia <hongyan.xia2@....com>
> Reviewed-by: Christian Loehle <christian.loehle@....com>
> Reviewed-by: Vincent Guittot <vincent.guittot@...aro.org>
> ---
> V2:
> - Correct the spelling mistakes in the commit message (Hongyan)
> - Add Reviewed-by
> ---
> ---
> kernel/sched/core.c | 4 ++--
> kernel/sched/sched.h | 28 ++++++++++++++--------------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 9aecd914ac69..38a7192bfc19 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1757,7 +1757,7 @@ static inline void uclamp_rq_inc(struct rq *rq, struct task_struct *p)
> * The condition is constructed such that a NOP is generated when
> * sched_uclamp_used is disabled.
> */
> - if (!static_branch_unlikely(&sched_uclamp_used))
> + if (!uclamp_is_used())
> return;
>
> if (unlikely(!p->sched_class->uclamp_enabled))
> @@ -1784,7 +1784,7 @@ static inline void uclamp_rq_dec(struct rq *rq, struct task_struct *p)
> * The condition is constructed such that a NOP is generated when
> * sched_uclamp_used is disabled.
> */
> - if (!static_branch_unlikely(&sched_uclamp_used))
> + if (!uclamp_is_used())
> return;
v2 includes the above two which inverse the likely annotation FYI.
Powered by blists - more mailing lists