[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200818112418.393286046@infradead.org>
Date: Tue, 18 Aug 2020 12:51:09 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: mingo@...nel.org, torvalds@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, will@...nel.org, paulmck@...nel.org,
hch@....de, axboe@...nel.dk, chris@...is-wilson.co.uk,
davem@...emloft.net, kuba@...nel.org, fweisbec@...il.com,
oleg@...hat.com, vincent.guittot@...aro.org, peterz@...radead.org
Subject: [RFC][PATCH v2 07/10] sched/fair: Exclude the current CPU from find_new_ilb()
It is possible for find_new_ilb() to select the current CPU, however,
this only happens from newidle balancing, in which case need_resched()
will be true, and consequently nohz_csd_func() will not trigger the
softirq.
Exclude the current CPU from becoming an ILB target.
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
kernel/sched/fair.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10026,6 +10026,10 @@ static inline int find_new_ilb(void)
for_each_cpu_and(ilb, nohz.idle_cpus_mask,
housekeeping_cpumask(HK_FLAG_MISC)) {
+
+ if (ilb == smp_processor_id())
+ continue;
+
if (idle_cpu(ilb))
return ilb;
}
Powered by blists - more mailing lists