[patch 2/4] isolation: set HK_FLAG_SCHED on nohz_full CPUs

From: Marcelo Tosatti
Date: Wed Apr 01 2020 - 08:15:49 EST


Avoid idle load balancing on nohz_full CPUs.

This avoids assigning tasks to such CPUs, when they enter idle.

Suggested-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: linux-2.6/kernel/sched/isolation.c
===================================================================
--- linux-2.6.orig/kernel/sched/isolation.c
+++ linux-2.6/kernel/sched/isolation.c
@@ -140,7 +140,8 @@ static int __init housekeeping_nohz_full
{
unsigned int flags;

- flags = HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC;
+ flags = HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER | HK_FLAG_RCU |
+ HK_FLAG_MISC | HK_FLAG_SCHED;

return housekeeping_setup(str, flags);
}