[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240703031610.587047-5-yangyingliang@huaweicloud.com>
Date: Wed, 3 Jul 2024 11:16:10 +0800
From: Yang Yingliang <yangyingliang@...weicloud.com>
To: linux-kernel@...r.kernel.org
Cc: 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,
bristot@...hat.com,
vschneid@...hat.com,
tglx@...utronix.de,
yu.c.chen@...el.com,
tim.c.chen@...ux.intel.com,
yangyingliang@...wei.com,
liwei391@...wei.com
Subject: [PATCH 4/4] sched/core: fix unbalance set_rq_online/offline() in sched_cpu_deactivate()
From: Yang Yingliang <yangyingliang@...wei.com>
If cpuset_cpu_inactive() fails, set_rq_online() need be called to rollback.
Fixes: 120455c514f7 ("sched: Fix hotplug vs CPU bandwidth control")
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2e114bce517a..01172d8bfe02 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -9781,6 +9781,7 @@ int sched_cpu_deactivate(unsigned int cpu)
ret = cpuset_cpu_inactive(cpu);
if (ret) {
sched_smt_present_inc(cpu);
+ sched_set_rq_online(rq, cpu);
balance_push_set(cpu, false);
set_cpu_active(cpu, true);
sched_update_numa(cpu, true);
--
2.25.1
Powered by blists - more mailing lists