[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <v7lpjkr7stdkm6qnmv5dnbxlekovrsa26wxofcsnblisscbgdw@ph2rmplamzkt>
Date: Fri, 6 Dec 2024 14:37:54 +0530
From: Srikar Dronamraju <srikar@...ux.ibm.com>
To: Vishal Chourasia <vishalc@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, mingo@...hat.com, peterz@...radead.org,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, sshegde@...ux.ibm.com
Subject: Re: [PATCH] sched/fair: Fix CPU bandwidth limit bypass during CPU
hotplug
* Vishal Chourasia <vishalc@...ux.ibm.com> [2024-11-26 12:18:13]:
> CPU controller limits are not properly enforced during CPU hotplug operations,
> particularly during CPU offline. When a CPU goes offline, throttled
> processes are unintentionally being unthrottled across all CPUs in the system,
> allowing them to exceed their assigned quota limits.
>
<snip>
> Signed-off-by: Vishal Chourasia <vishalc@...ux.ibm.com>
> ---
> kernel/sched/fair.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index fbdca89c677f..c436e2307e6f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6684,7 +6684,8 @@ static void __maybe_unused unthrottle_offline_cfs_rqs(struct rq *rq)
> list_for_each_entry_rcu(tg, &task_groups, list) {
> struct cfs_rq *cfs_rq = tg->cfs_rq[cpu_of(rq)];
>
> - if (!cfs_rq->runtime_enabled)
> + /* Don't unthrottle an active cfs_rq unnecessarily */
Per the patch description, its not just unnecessary but unthrottling is
buggy. Unnecessary would mean its just an overhead. Here we dont want to
unthrottle. Other than that this seems to be fine to me.
> + if (!cfs_rq->runtime_enabled || cpumask_test_cpu(cpu_of(rq), cpu_active_mask))
> continue;
--
Thanks and Regards
Srikar Dronamraju
Powered by blists - more mailing lists