* [tip: sched/core] sched/fair: Exclude the current CPU from find_new_ilb()
@ 2020-10-29 10:51 tip-bot2 for Peter Zijlstra
0 siblings, 0 replies; only message in thread
From: tip-bot2 for Peter Zijlstra @ 2020-10-29 10:51 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Peter Zijlstra (Intel), x86, LKML
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 45da7a2b0af8fa29dff2e6ba8926322068350fce
Gitweb: https://git.kernel.org/tip/45da7a2b0af8fa29dff2e6ba8926322068350fce
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Tue, 18 Aug 2020 10:48:17 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 29 Oct 2020 11:00:30 +01:00
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@infradead.org>
---
kernel/sched/fair.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b9368d1..cd9a37c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10056,6 +10056,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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-29 10:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 10:51 [tip: sched/core] sched/fair: Exclude the current CPU from find_new_ilb() tip-bot2 for Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®