sched: Miscellaneous isolation related cleanups
Subsystems (2)
v4 cover sched: Miscellaneous isolation related cleanups
v4:
- Make "isolcpus=nohz" equivalent to "nohz_full" as suggested by Federic.
- Update the scheduler code to use HK_TYPE_KERNEL_NOISE.
v3:
- Fix incorrect housekeeping_nohz_full_setup() flags setting.
v2:
- Remove HK_TYPE_SCHED and related dead code
- Change consolidated name from HK_TYPE_NOHZ_FULL to HK_TYPE_KERNEL_NOSISE as suggested by Frederic and update isolation.c as well.
This series contains a number of miscellaneous sched/isolation related cleanups. Other than reducing the number of cpumasks in the housekeeping structure, there should be no other functional change.
[v1] https://lore.kernel.org/lkml/[email protected]/
[v2] https://lore.kernel.org/lkml/[email protected]/
[v3] https://lore.kernel.org/lkml/[email protected]/
Waiman Long (4):
sched/core: Remove HK_TYPE_SCHED
sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full" sched/isolation: Consolidate housekeeping cpumasks that are always
identical
sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
.../admin-guide/kernel-parameters.txt | 4 +++- include/linux/sched/isolation.h | 21 +++++++++++------- kernel/sched/core.c | 12 +++++----- kernel/sched/fair.c | 19 +++------------- kernel/sched/isolation.c | 22 ++++++++----------- 5 files changed, 34 insertions(+), 44 deletions(-)
Signature · 1 line
2.43.5
PATCH v4 1/4 sched/core: Remove HK_TYPE_SCHED
The HK_TYPE_SCHED housekeeping type is defined but not set anywhere. So any code that try to use HK_TYPE_SCHED are essentially dead code. So remove HK_TYPE_SCHED and any code that use it.
--- include/linux/sched/isolation.h | 1 - kernel/sched/fair.c | 14 -------------- kernel/sched/isolation.c | 1 - 3 files changed, 16 deletions(-)
include/linux/sched/isolation.h +0 -1
@@ -10,7 +10,6 @@ enum hk_type {HK_TYPE_TIMER ,HK_TYPE_RCU ,HK_TYPE_MISC , -HK_TYPE_SCHED ,HK_TYPE_TICK ,HK_TYPE_DOMAIN , HK_TYPE_WQ,
kernel/sched/fair.c +0 -14
@@ -12202,9 +12202,6 @@ static inline int on_null_domain(struct rq *rq)* - When one of the busy CPUs notices that there may be an idle rebalancing * needed, they will kick the idle load balancer, which then does idle * load balancing for all the idle CPUs. -* -* - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED is not set -* anywhere yet. */ static inline int find_new_ilb (void ) {
@@ -12449,10 +12446,6 @@ void nohz_balance_enter_idle(int cpu)if (!cpu_active (cpu))return ; -/* Spare idle load balancing on CPUs that don't want to be disturbed: */ -if (!housekeeping_cpu (cpu,HK_TYPE_SCHED )) -return ; -/* * Can be set safely without rq->lock held * If a clear happens, it will have evaluated last additions because
@@ -12672,13 +12665,6 @@ static void nohz_newidle_balance(struct rq *this_rq) {int this_cpu = this_rq->cpu; -/* -* This CPU doesn't want to be disturbed by scheduler -* housekeeping -*/ -if (!housekeeping_cpu (this_cpu,HK_TYPE_SCHED )) -return ; -/* Will wake up very soon. No time for doing anything else*/ if (this_rq->avg_idle < sysctl_sched_migration_cost)return ;
kernel/sched/isolation.c +0 -1
@@ -12,7 +12,6 @@ enum hk_flags {HK_FLAG_TIMER =BIT (HK_TYPE_TIMER ),HK_FLAG_RCU =BIT (HK_TYPE_RCU ),HK_FLAG_MISC =BIT (HK_TYPE_MISC ), -HK_FLAG_SCHED =BIT (HK_TYPE_SCHED ),HK_FLAG_TICK =BIT (HK_TYPE_TICK ),HK_FLAG_DOMAIN =BIT (HK_TYPE_DOMAIN ), HK_FLAG_WQ = BIT(HK_TYPE_WQ),
Signature · 1 line
2.43.5
Re: [PATCH v4 1/4] sched/core: Remove HK_TYPE_SCHED
Quoted 5 lines · Waiman Long
The
HK_TYPE_SCHEDhousekeeping type is defined but not set anywhere. So any code that try to useHK_TYPE_SCHEDare essentially dead code. So removeHK_TYPE_SCHEDand any code that use it.Signed-off-by Waiman Long <[email protected]>
PATCH v4 2/4 sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full"
In reply to Waiman LongThe "isolcpus=nohz" boot parameter and flag were used to disable tick when running a single task. Nowsdays, this "nohz" flag is seldomly used as it is included as part of the "nohz_full" parameter. Extend this flag to cover other kernel noises disabled by the "nohz_full" parameter to make them equivalent. This also eliminates the need to use both the "isolcpus" and the "nohz_full" parameters to fully isolated a given set of CPUs.
--- Documentation/admin-guide/kernel-parameters.txt | 4 +++- kernel/sched/isolation.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +3 -1
@@ -2424,7 +2424,9 @@ specified in the flag list (default: domain): nohz - Disable the tick when a single task runs. + Disable the tick when a single task runs as well as + disabling other kernel noises like having RCU callbacks + offloaded. This is equivalent to the nohz_full parameter. A residual 1Hz tick is offloaded to workqueues, which you need to affine to housekeeping through the global
kernel/sched/isolation.c +5 -1
@@ -209,9 +209,13 @@ static int __init housekeeping_isolcpus_setup(char *str)int len;while (isalpha (*str)) { +/* +* isolcpus=nohz is equivalent to nohz_full. +*/ if (!strncmp (str,"nohz," ,5 )) { str +=5 ; - flags |=HK_FLAG_TICK ; + flags |=HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER | +HK_FLAG_RCU |HK_FLAG_MISC |HK_FLAG_KTHREAD ;continue ; }
Signature · 1 line
2.43.5
Re: [PATCH v4 2/4] sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full"
Quoted 10 lines · Waiman Long
The "isolcpus=nohz" boot parameter and flag were used to disable tick when running a single task. Nowsdays, this "nohz" flag is seldomly used as it is included as part of the "
nohz_full" parameter. Extend this flag to cover other kernel noises disabled by the "nohz_full" parameter to make them equivalent. This also eliminates the need to use both the "isolcpus" and the "nohz_full" parameters to fully isolated a given set of CPUs.Suggested-by Frederic Weisbecker <[email protected]>Signed-off-by Waiman Long <[email protected]>
PATCH v4 3/4 sched/isolation: Consolidate housekeeping cpumasks that are always identical
In reply to Waiman LongThe housekeeping cpumasks are only set by two boot commandline
parameters: "nohz_full" and "isolcpus". When there is more than one of "nohz_full" or "isolcpus", the extra ones must have the same CPU list or the setup will fail partially.
The HK_TYPE_DOMAIN and HK_TYPE_MANAGED_IRQ types are settable by "isolcpus" only and their settings can be independent of the other types. The other housekeeping types are all set by "nohz_full" or "isolcpus=nohz" without a way to set them individually. So they all have identical cpumasks.
There is actually no point in having different cpumasks for these "nohz_full" only housekeeping types. Consolidate these types to use the same cpumask by aliasing them to the same value. If there is a need to set any of them independently in the future, we can break them out to their own cpumasks again.
With this change, the number of cpumasks in the housekeeping structure drops from 9 to 3. Other than that, there should be no other functional change.
--- include/linux/sched/isolation.h | 20 +++++++++++++------- kernel/sched/isolation.c | 19 ++++++------------- 2 files changed, 19 insertions(+), 20 deletions(-)
include/linux/sched/isolation.h +13 -7
@@ -7,15 +7,21 @@#include <linux/tick.h> enum hk_type { -HK_TYPE_TIMER , -HK_TYPE_RCU , -HK_TYPE_MISC , -HK_TYPE_TICK ,HK_TYPE_DOMAIN , -HK_TYPE_WQ ,HK_TYPE_MANAGED_IRQ , -HK_TYPE_KTHREAD , -HK_TYPE_MAX +HK_TYPE_KERNEL_NOISE , +HK_TYPE_MAX , + +/* +* The following housekeeping types are only set by the nohz_full +* boot commandline option. So they can share the same value. +*/ +HK_TYPE_TICK =HK_TYPE_KERNEL_NOISE , +HK_TYPE_TIMER =HK_TYPE_KERNEL_NOISE , +HK_TYPE_RCU =HK_TYPE_KERNEL_NOISE , +HK_TYPE_MISC =HK_TYPE_KERNEL_NOISE , +HK_TYPE_WQ =HK_TYPE_KERNEL_NOISE , +HK_TYPE_KTHREAD =HK_TYPE_KERNEL_NOISE };#ifdef CONFIG_CPU_ISOLATION
kernel/sched/isolation.c +6 -13
@@ -9,14 +9,9 @@*/ enum hk_flags { -HK_FLAG_TIMER =BIT (HK_TYPE_TIMER ), -HK_FLAG_RCU =BIT (HK_TYPE_RCU ), -HK_FLAG_MISC =BIT (HK_TYPE_MISC ), -HK_FLAG_TICK =BIT (HK_TYPE_TICK ),HK_FLAG_DOMAIN =BIT (HK_TYPE_DOMAIN ), -HK_FLAG_WQ =BIT (HK_TYPE_WQ ),HK_FLAG_MANAGED_IRQ =BIT (HK_TYPE_MANAGED_IRQ ), -HK_FLAG_KTHREAD =BIT (HK_TYPE_KTHREAD ), +HK_FLAG_KERNEL_NOISE =BIT (HK_TYPE_KERNEL_NOISE ), };DEFINE_STATIC_KEY_FALSE (housekeeping_overridden);
@@ -96,7 +91,7 @@ void __init housekeeping_init(void)static_branch_enable (&housekeeping_overridden); -if (housekeeping.flags &HK_FLAG_TICK ) +if (housekeeping.flags &HK_FLAG_KERNEL_NOISE )sched_tick_offload_init ();for_each_set_bit (type, &housekeeping.flags,HK_TYPE_MAX ) {
@@ -120,7 +115,7 @@ static int __init housekeeping_setup(char *str, unsigned long flags)unsigned int first_cpu;int err =0 ; -if ((flags &HK_FLAG_TICK ) && !(housekeeping.flags &HK_FLAG_TICK )) { +if ((flags &HK_FLAG_KERNEL_NOISE ) && !(housekeeping.flags &HK_FLAG_KERNEL_NOISE )) {if (!IS_ENABLED (CONFIG_NO_HZ_FULL )) {pr_warn ("Housekeeping: nohz unsupported." " Build with CONFIG_NO_HZ_FULL\n" );
@@ -176,7 +171,7 @@ static int __init housekeeping_setup(char *str, unsigned long flags)housekeeping_setup_type (type, housekeeping_staging); } -if ((flags &HK_FLAG_TICK ) && !(housekeeping.flags &HK_FLAG_TICK )) +if ((flags &HK_FLAG_KERNEL_NOISE ) && !(housekeeping.flags &HK_FLAG_KERNEL_NOISE ))tick_nohz_full_setup (non_housekeeping_mask); housekeeping.flags |= flags;
@@ -194,8 +189,7 @@ static int __init housekeeping_nohz_full_setup(char *str) {unsigned long flags; - flags =HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER |HK_FLAG_RCU | -HK_FLAG_MISC |HK_FLAG_KTHREAD ; + flags =HK_FLAG_KERNEL_NOISE ;return housekeeping_setup (str, flags); }
@@ -214,8 +208,7 @@ static int __init housekeeping_isolcpus_setup(char *str)*/ if (!strncmp (str,"nohz," ,5 )) { str +=5 ; - flags |=HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER | -HK_FLAG_RCU |HK_FLAG_MISC |HK_FLAG_KTHREAD ; + flags |=HK_FLAG_KERNEL_NOISE ;continue ; }
Signature · 1 line
2.43.5
Re: [PATCH v4 3/4] sched/isolation: Consolidate housekeeping cpumasks that are always identical
Quoted 17 lines · Waiman Long
The housekeeping cpumasks are only set by two boot commandline
parameters: "nohz_full" and "isolcpus". When there is more than one of "nohz_full" or "isolcpus", the extra ones must have the same CPU list or the setup will fail partially.The
HK_TYPE_DOMAINandHK_TYPE_MANAGED_IRQtypes are settable by "isolcpus" only and their settings can be independent of the other types. The other housekeeping types are all set by "nohz_full" or "isolcpus=nohz" without a way to set them individually. So they all have identical cpumasks.There is actually no point in having different cpumasks for these "
nohz_full" only housekeeping types. Consolidate these types to use the same cpumask by aliasing them to the same value. If there is a need to set any of them independently in the future, we can break them out to their own cpumasks again.
Quoted 5 lines
With this change, the number of cpumasks in the housekeeping structure drops from 9 to 3. Other than that, there should be no other functional change.
Signed-off-by Waiman Long <[email protected]>
PATCH v4 4/4 sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
In reply to Waiman LongAs all the non-domain and non-managed_irq housekeeping types have been unified to HK_TYPE_KERNEL_NOISE, replace all these references in the scheduler to use HK_TYPE_KERNEL_NOISE.
--- kernel/sched/core.c | 12 ++++++------ kernel/sched/fair.c | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-)
kernel/sched/core.c +6 -6
@@ -1114,13 +1114,13 @@ int get_nohz_timer_target(void)struct sched_domain *sd;const struct cpumask *hk_mask; -if (housekeeping_cpu (cpu,HK_TYPE_TIMER )) { +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE )) {if (!idle_cpu (cpu))return cpu; default_cpu = cpu; } - hk_mask =housekeeping_cpumask (HK_TYPE_TIMER ); + hk_mask =housekeeping_cpumask (HK_TYPE_KERNEL_NOISE );guard (rcu)();
@@ -1135,7 +1135,7 @@ int get_nohz_timer_target(void) }if (default_cpu ==-1 ) - default_cpu =housekeeping_any_cpu (HK_TYPE_TIMER ); + default_cpu =housekeeping_any_cpu (HK_TYPE_KERNEL_NOISE );return default_cpu; }
@@ -5526,7 +5526,7 @@ void sched_tick(void)unsigned long hw_pressure;u64 resched_latency; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))arch_scale_freq_tick ();sched_clock_tick ();
@@ -5652,7 +5652,7 @@ static void sched_tick_start(int cpu)int os;struct tick_work *twork; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))return ;WARN_ON_ONCE (!tick_work_cpu);
@@ -5673,7 +5673,7 @@ static void sched_tick_stop(int cpu)struct tick_work *twork;int os; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))return ;WARN_ON_ONCE (!tick_work_cpu);
kernel/sched/fair.c +3 -2
@@ -12208,7 +12208,7 @@ static inline int find_new_ilb(void)const struct cpumask *hk_mask;int ilb_cpu; - hk_mask =housekeeping_cpumask (HK_TYPE_MISC ); + hk_mask =housekeeping_cpumask (HK_TYPE_KERNEL_NOISE );for_each_cpu_and (ilb_cpu, nohz.idle_cpus_mask, hk_mask) {
@@ -12226,7 +12226,8 @@ static inline int find_new_ilb(void)* Kick a CPU to do the NOHZ balancing, if it is time for it, via a cross-CPU * SMP function call (IPI). * -* We pick the first idle CPU in the HK_TYPE_MISC housekeeping set (if there is one). +* We pick the first idle CPU in the HK_TYPE_KERNEL_NOISE housekeeping set +* (if there is one). */ static void kick_ilb (unsigned int flags) {
Signature · 1 line
2.43.5
Re: [PATCH v4 4/4] sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
Quoted 5 lines · Waiman Long
As all the non-domain and non-managed_irq housekeeping types have been unified to
HK_TYPE_KERNEL_NOISE, replace all these references in the scheduler to useHK_TYPE_KERNEL_NOISE.Signed-off-by Waiman Long <[email protected]>
Quoted 29 lines · Waiman Long
v4:
- Make "isolcpus=nohz" equivalent to "nohz_full" as suggested by Federic.
- Update the scheduler code to useHK_TYPE_KERNEL_NOISE.v3:
- Fix incorrecthousekeeping_nohz_full_setup()flags setting.v2:
- RemoveHK_TYPE_SCHEDand related dead code
- Change consolidated name fromHK_TYPE_NOHZ_FULLtoHK_TYPE_KERNEL_NOSISEas suggested by Frederic and updateisolation.cas well.This series contains a number of miscellaneous sched/isolation related cleanups. Other than reducing the number of cpumasks in the housekeeping structure, there should be no other functional change.
[v1] https://lore.kernel.org/lkml/[email protected]/
[v2] https://lore.kernel.org/lkml/[email protected]/
[v3] https://lore.kernel.org/lkml/[email protected]/Waiman Long (4):
sched/core: RemoveHK_TYPE_SCHED
sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full" sched/isolation: Consolidate housekeeping cpumasks that are always
identical
sched: Unify HK_TYPE_{TIMER|TICK|MISC} toHK_TYPE_KERNEL_NOISE
Quoted 7 lines
.../admin-guide/kernel-parameters.txt | 4 +++- include/linux/sched/isolation.h | 21 +++++++++++------- kernel/sched/core.c | 12 +++++----- kernel/sched/fair.c | 19 +++------------- kernel/sched/isolation.c | 22 ++++++++----------- 5 files changed, 34 insertions(+), 44 deletions(-)
Peter, are you fine with the changes in this series? I got the acks from Frederic, but I haven't receive any comments after that.
Thanks,
Longman
v4 cover sched: Miscellaneous isolation related cleanups
In reply to Waiman Long v4:
- Make "isolcpus=nohz" equivalent to "nohz_full" as suggested by Federic.
- Update the scheduler code to use HK_TYPE_KERNEL_NOISE.
v3:
- Fix incorrect housekeeping_nohz_full_setup() flags setting.
v2:
- Remove HK_TYPE_SCHED and related dead code
- Change consolidated name from HK_TYPE_NOHZ_FULL to HK_TYPE_KERNEL_NOSISE as suggested by Frederic and update isolation.c as well.
This series contains a number of miscellaneous sched/isolation related cleanups. Other than reducing the number of cpumasks in the housekeeping structure, there should be no other functional change.
[v1] https://lore.kernel.org/lkml/[email protected]/
[v2] https://lore.kernel.org/lkml/[email protected]/
[v3] https://lore.kernel.org/lkml/[email protected]/
Waiman Long (4):
sched/core: Remove HK_TYPE_SCHED
sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full" sched/isolation: Consolidate housekeeping cpumasks that are always
identical
sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
.../admin-guide/kernel-parameters.txt | 4 +++- include/linux/sched/isolation.h | 21 +++++++++++------- kernel/sched/core.c | 12 +++++----- kernel/sched/fair.c | 19 +++------------- kernel/sched/isolation.c | 22 ++++++++----------- 5 files changed, 34 insertions(+), 44 deletions(-)
Signature · 1 line
2.43.5
PATCH RESEND v4 1/4 sched/core: Remove HK_TYPE_SCHED
The HK_TYPE_SCHED housekeeping type is defined but not set anywhere. So any code that try to use HK_TYPE_SCHED are essentially dead code. So remove HK_TYPE_SCHED and any code that use it.
--- include/linux/sched/isolation.h | 1 - kernel/sched/fair.c | 14 -------------- kernel/sched/isolation.c | 1 - 3 files changed, 16 deletions(-)
include/linux/sched/isolation.h +0 -1
@@ -10,7 +10,6 @@ enum hk_type {HK_TYPE_TIMER ,HK_TYPE_RCU ,HK_TYPE_MISC , -HK_TYPE_SCHED ,HK_TYPE_TICK ,HK_TYPE_DOMAIN , HK_TYPE_WQ,
kernel/sched/fair.c +0 -14
@@ -12202,9 +12202,6 @@ static inline int on_null_domain(struct rq *rq)* - When one of the busy CPUs notices that there may be an idle rebalancing * needed, they will kick the idle load balancer, which then does idle * load balancing for all the idle CPUs. -* -* - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED is not set -* anywhere yet. */ static inline int find_new_ilb (void ) {
@@ -12449,10 +12446,6 @@ void nohz_balance_enter_idle(int cpu)if (!cpu_active (cpu))return ; -/* Spare idle load balancing on CPUs that don't want to be disturbed: */ -if (!housekeeping_cpu (cpu,HK_TYPE_SCHED )) -return ; -/* * Can be set safely without rq->lock held * If a clear happens, it will have evaluated last additions because
@@ -12672,13 +12665,6 @@ static void nohz_newidle_balance(struct rq *this_rq) {int this_cpu = this_rq->cpu; -/* -* This CPU doesn't want to be disturbed by scheduler -* housekeeping -*/ -if (!housekeeping_cpu (this_cpu,HK_TYPE_SCHED )) -return ; -/* Will wake up very soon. No time for doing anything else*/ if (this_rq->avg_idle < sysctl_sched_migration_cost)return ;
kernel/sched/isolation.c +0 -1
@@ -12,7 +12,6 @@ enum hk_flags {HK_FLAG_TIMER =BIT (HK_TYPE_TIMER ),HK_FLAG_RCU =BIT (HK_TYPE_RCU ),HK_FLAG_MISC =BIT (HK_TYPE_MISC ), -HK_FLAG_SCHED =BIT (HK_TYPE_SCHED ),HK_FLAG_TICK =BIT (HK_TYPE_TICK ),HK_FLAG_DOMAIN =BIT (HK_TYPE_DOMAIN ), HK_FLAG_WQ = BIT(HK_TYPE_WQ),
Signature · 1 line
2.43.5
[tip: sched/core] sched/core: Remove HK_TYPE_SCHED
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: ae5c677729e99b8cb3e6252aaa9b72a92985d203 Gitweb: https://git.kernel.org/tip/ae5c677729e99b8cb3e6252aaa9b72a92985d203 Author: Waiman Long <[email protected]> AuthorDate: Wed, 30 Oct 2024 13:52:50 -04:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 02 Dec 2024 12:24:27 +01:00
sched/core: Remove HK_TYPE_SCHED
The HK_TYPE_SCHED housekeeping type is defined but not set anywhere. So any code that try to use HK_TYPE_SCHED are essentially dead code. So remove HK_TYPE_SCHED and any code that use it.
--- include/linux/sched/isolation.h | 1 - kernel/sched/fair.c | 14 -------------- kernel/sched/isolation.c | 1 - 3 files changed, 16 deletions(-)
include/linux/sched/isolation.h +0 -1
@@ -10,7 +10,6 @@ enum hk_type {HK_TYPE_TIMER ,HK_TYPE_RCU ,HK_TYPE_MISC , -HK_TYPE_SCHED ,HK_TYPE_TICK ,HK_TYPE_DOMAIN , HK_TYPE_WQ,
kernel/sched/fair.c +0 -14
@@ -12197,9 +12197,6 @@ static inline int on_null_domain(struct rq *rq)* - When one of the busy CPUs notices that there may be an idle rebalancing * needed, they will kick the idle load balancer, which then does idle * load balancing for all the idle CPUs. -* -* - HK_TYPE_MISC CPUs are used for this task, because HK_TYPE_SCHED is not set -* anywhere yet. */ static inline int find_new_ilb (void ) {
@@ -12444,10 +12441,6 @@ void nohz_balance_enter_idle(int cpu)if (!cpu_active (cpu))return ; -/* Spare idle load balancing on CPUs that don't want to be disturbed: */ -if (!housekeeping_cpu (cpu,HK_TYPE_SCHED )) -return ; -/* * Can be set safely without rq->lock held * If a clear happens, it will have evaluated last additions because
@@ -12667,13 +12660,6 @@ static void nohz_newidle_balance(struct rq *this_rq) {int this_cpu = this_rq->cpu; -/* -* This CPU doesn't want to be disturbed by scheduler -* housekeeping -*/ -if (!housekeeping_cpu (this_cpu,HK_TYPE_SCHED )) -return ; -/* Will wake up very soon. No time for doing anything else*/ if (this_rq->avg_idle < sysctl_sched_migration_cost)return ;
kernel/sched/isolation.c +0 -1
@@ -12,7 +12,6 @@ enum hk_flags {HK_FLAG_TIMER =BIT (HK_TYPE_TIMER ),HK_FLAG_RCU =BIT (HK_TYPE_RCU ),HK_FLAG_MISC =BIT (HK_TYPE_MISC ), -HK_FLAG_SCHED =BIT (HK_TYPE_SCHED ),HK_FLAG_TICK =BIT (HK_TYPE_TICK ),HK_FLAG_DOMAIN =BIT (HK_TYPE_DOMAIN ), HK_FLAG_WQ = BIT(HK_TYPE_WQ),
PATCH RESEND v4 2/4 sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full"
In reply to Waiman LongThe "isolcpus=nohz" boot parameter and flag were used to disable tick when running a single task. Nowsdays, this "nohz" flag is seldomly used as it is included as part of the "nohz_full" parameter. Extend this flag to cover other kernel noises disabled by the "nohz_full" parameter to make them equivalent. This also eliminates the need to use both the "isolcpus" and the "nohz_full" parameters to fully isolated a given set of CPUs.
--- Documentation/admin-guide/kernel-parameters.txt | 4 +++- kernel/sched/isolation.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +3 -1
@@ -2424,7 +2424,9 @@ specified in the flag list (default: domain): nohz - Disable the tick when a single task runs. + Disable the tick when a single task runs as well as + disabling other kernel noises like having RCU callbacks + offloaded. This is equivalent to the nohz_full parameter. A residual 1Hz tick is offloaded to workqueues, which you need to affine to housekeeping through the global
kernel/sched/isolation.c +5 -1
@@ -209,9 +209,13 @@ static int __init housekeeping_isolcpus_setup(char *str)int len;while (isalpha (*str)) { +/* +* isolcpus=nohz is equivalent to nohz_full. +*/ if (!strncmp (str,"nohz," ,5 )) { str +=5 ; - flags |=HK_FLAG_TICK ; + flags |=HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER | +HK_FLAG_RCU |HK_FLAG_MISC |HK_FLAG_KTHREAD ;continue ; }
Signature · 1 line
2.43.5
[tip: sched/core] sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full"
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 1174b9344bc7e7989439cad207fcd94eaab028db Gitweb: https://git.kernel.org/tip/1174b9344bc7e7989439cad207fcd94eaab028db Author: Waiman Long <[email protected]> AuthorDate: Wed, 30 Oct 2024 13:52:51 -04:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 02 Dec 2024 12:24:28 +01:00
sched/isolation: Make "isolcpus=nohz" equivalent to "nohz_full"
The "isolcpus=nohz" boot parameter and flag were used to disable tick when running a single task. Nowsdays, this "nohz" flag is seldomly used as it is included as part of the "nohz_full" parameter. Extend this flag to cover other kernel noises disabled by the "nohz_full" parameter to make them equivalent. This also eliminates the need to use both the "isolcpus" and the "nohz_full" parameters to fully isolated a given set of CPUs.
--- Documentation/admin-guide/kernel-parameters.txt | 4 +++- kernel/sched/isolation.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +3 -1
@@ -2432,7 +2432,9 @@ specified in the flag list (default: domain): nohz - Disable the tick when a single task runs. + Disable the tick when a single task runs as well as + disabling other kernel noises like having RCU callbacks + offloaded. This is equivalent to the nohz_full parameter. A residual 1Hz tick is offloaded to workqueues, which you need to affine to housekeeping through the global
kernel/sched/isolation.c +5 -1
@@ -209,9 +209,13 @@ static int __init housekeeping_isolcpus_setup(char *str)int len;while (isalpha (*str)) { +/* +* isolcpus=nohz is equivalent to nohz_full. +*/ if (!strncmp (str,"nohz," ,5 )) { str +=5 ; - flags |=HK_FLAG_TICK ; + flags |=HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER | +HK_FLAG_RCU |HK_FLAG_MISC |HK_FLAG_KTHREAD ;continue ; }
PATCH RESEND v4 3/4 sched/isolation: Consolidate housekeeping cpumasks that are always identical
In reply to Waiman LongThe housekeeping cpumasks are only set by two boot commandline
parameters: "nohz_full" and "isolcpus". When there is more than one of "nohz_full" or "isolcpus", the extra ones must have the same CPU list or the setup will fail partially.
The HK_TYPE_DOMAIN and HK_TYPE_MANAGED_IRQ types are settable by "isolcpus" only and their settings can be independent of the other types. The other housekeeping types are all set by "nohz_full" or "isolcpus=nohz" without a way to set them individually. So they all have identical cpumasks.
There is actually no point in having different cpumasks for these "nohz_full" only housekeeping types. Consolidate these types to use the same cpumask by aliasing them to the same value. If there is a need to set any of them independently in the future, we can break them out to their own cpumasks again.
With this change, the number of cpumasks in the housekeeping structure drops from 9 to 3. Other than that, there should be no other functional change.
--- include/linux/sched/isolation.h | 20 +++++++++++++------- kernel/sched/isolation.c | 19 ++++++------------- 2 files changed, 19 insertions(+), 20 deletions(-)
include/linux/sched/isolation.h +13 -7
@@ -7,15 +7,21 @@#include <linux/tick.h> enum hk_type { -HK_TYPE_TIMER , -HK_TYPE_RCU , -HK_TYPE_MISC , -HK_TYPE_TICK ,HK_TYPE_DOMAIN , -HK_TYPE_WQ ,HK_TYPE_MANAGED_IRQ , -HK_TYPE_KTHREAD , -HK_TYPE_MAX +HK_TYPE_KERNEL_NOISE , +HK_TYPE_MAX , + +/* +* The following housekeeping types are only set by the nohz_full +* boot commandline option. So they can share the same value. +*/ +HK_TYPE_TICK =HK_TYPE_KERNEL_NOISE , +HK_TYPE_TIMER =HK_TYPE_KERNEL_NOISE , +HK_TYPE_RCU =HK_TYPE_KERNEL_NOISE , +HK_TYPE_MISC =HK_TYPE_KERNEL_NOISE , +HK_TYPE_WQ =HK_TYPE_KERNEL_NOISE , +HK_TYPE_KTHREAD =HK_TYPE_KERNEL_NOISE };#ifdef CONFIG_CPU_ISOLATION
kernel/sched/isolation.c +6 -13
@@ -9,14 +9,9 @@*/ enum hk_flags { -HK_FLAG_TIMER =BIT (HK_TYPE_TIMER ), -HK_FLAG_RCU =BIT (HK_TYPE_RCU ), -HK_FLAG_MISC =BIT (HK_TYPE_MISC ), -HK_FLAG_TICK =BIT (HK_TYPE_TICK ),HK_FLAG_DOMAIN =BIT (HK_TYPE_DOMAIN ), -HK_FLAG_WQ =BIT (HK_TYPE_WQ ),HK_FLAG_MANAGED_IRQ =BIT (HK_TYPE_MANAGED_IRQ ), -HK_FLAG_KTHREAD =BIT (HK_TYPE_KTHREAD ), +HK_FLAG_KERNEL_NOISE =BIT (HK_TYPE_KERNEL_NOISE ), };DEFINE_STATIC_KEY_FALSE (housekeeping_overridden);
@@ -96,7 +91,7 @@ void __init housekeeping_init(void)static_branch_enable (&housekeeping_overridden); -if (housekeeping.flags &HK_FLAG_TICK ) +if (housekeeping.flags &HK_FLAG_KERNEL_NOISE )sched_tick_offload_init ();for_each_set_bit (type, &housekeeping.flags,HK_TYPE_MAX ) {
@@ -120,7 +115,7 @@ static int __init housekeeping_setup(char *str, unsigned long flags)unsigned int first_cpu;int err =0 ; -if ((flags &HK_FLAG_TICK ) && !(housekeeping.flags &HK_FLAG_TICK )) { +if ((flags &HK_FLAG_KERNEL_NOISE ) && !(housekeeping.flags &HK_FLAG_KERNEL_NOISE )) {if (!IS_ENABLED (CONFIG_NO_HZ_FULL )) {pr_warn ("Housekeeping: nohz unsupported." " Build with CONFIG_NO_HZ_FULL\n" );
@@ -176,7 +171,7 @@ static int __init housekeeping_setup(char *str, unsigned long flags)housekeeping_setup_type (type, housekeeping_staging); } -if ((flags &HK_FLAG_TICK ) && !(housekeeping.flags &HK_FLAG_TICK )) +if ((flags &HK_FLAG_KERNEL_NOISE ) && !(housekeeping.flags &HK_FLAG_KERNEL_NOISE ))tick_nohz_full_setup (non_housekeeping_mask); housekeeping.flags |= flags;
@@ -194,8 +189,7 @@ static int __init housekeeping_nohz_full_setup(char *str) {unsigned long flags; - flags =HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER |HK_FLAG_RCU | -HK_FLAG_MISC |HK_FLAG_KTHREAD ; + flags =HK_FLAG_KERNEL_NOISE ;return housekeeping_setup (str, flags); }
@@ -214,8 +208,7 @@ static int __init housekeeping_isolcpus_setup(char *str)*/ if (!strncmp (str,"nohz," ,5 )) { str +=5 ; - flags |=HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER | -HK_FLAG_RCU |HK_FLAG_MISC |HK_FLAG_KTHREAD ; + flags |=HK_FLAG_KERNEL_NOISE ;continue ; }
Signature · 1 line
2.43.5
[tip: sched/core] sched/isolation: Consolidate housekeeping cpumasks that are always identical
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 6010d245ddc9f463bbf0311ac49073a78f444755 Gitweb: https://git.kernel.org/tip/6010d245ddc9f463bbf0311ac49073a78f444755 Author: Waiman Long <[email protected]> AuthorDate: Wed, 30 Oct 2024 13:52:52 -04:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 02 Dec 2024 12:24:28 +01:00
sched/isolation: Consolidate housekeeping cpumasks that are always identical
The housekeeping cpumasks are only set by two boot commandline
parameters: "nohz_full" and "isolcpus". When there is more than one of "nohz_full" or "isolcpus", the extra ones must have the same CPU list or the setup will fail partially.
The HK_TYPE_DOMAIN and HK_TYPE_MANAGED_IRQ types are settable by "isolcpus" only and their settings can be independent of the other types. The other housekeeping types are all set by "nohz_full" or "isolcpus=nohz" without a way to set them individually. So they all have identical cpumasks.
There is actually no point in having different cpumasks for these "nohz_full" only housekeeping types. Consolidate these types to use the same cpumask by aliasing them to the same value. If there is a need to set any of them independently in the future, we can break them out to their own cpumasks again.
With this change, the number of cpumasks in the housekeeping structure drops from 9 to 3. Other than that, there should be no other functional change.
--- include/linux/sched/isolation.h | 20 +++++++++++++------- kernel/sched/isolation.c | 19 ++++++------------- 2 files changed, 19 insertions(+), 20 deletions(-)
include/linux/sched/isolation.h +13 -7
@@ -7,15 +7,21 @@#include <linux/tick.h> enum hk_type { -HK_TYPE_TIMER , -HK_TYPE_RCU , -HK_TYPE_MISC , -HK_TYPE_TICK ,HK_TYPE_DOMAIN , -HK_TYPE_WQ ,HK_TYPE_MANAGED_IRQ , -HK_TYPE_KTHREAD , -HK_TYPE_MAX +HK_TYPE_KERNEL_NOISE , +HK_TYPE_MAX , + +/* +* The following housekeeping types are only set by the nohz_full +* boot commandline option. So they can share the same value. +*/ +HK_TYPE_TICK =HK_TYPE_KERNEL_NOISE , +HK_TYPE_TIMER =HK_TYPE_KERNEL_NOISE , +HK_TYPE_RCU =HK_TYPE_KERNEL_NOISE , +HK_TYPE_MISC =HK_TYPE_KERNEL_NOISE , +HK_TYPE_WQ =HK_TYPE_KERNEL_NOISE , +HK_TYPE_KTHREAD =HK_TYPE_KERNEL_NOISE };#ifdef CONFIG_CPU_ISOLATION
kernel/sched/isolation.c +6 -13
@@ -9,14 +9,9 @@*/ enum hk_flags { -HK_FLAG_TIMER =BIT (HK_TYPE_TIMER ), -HK_FLAG_RCU =BIT (HK_TYPE_RCU ), -HK_FLAG_MISC =BIT (HK_TYPE_MISC ), -HK_FLAG_TICK =BIT (HK_TYPE_TICK ),HK_FLAG_DOMAIN =BIT (HK_TYPE_DOMAIN ), -HK_FLAG_WQ =BIT (HK_TYPE_WQ ),HK_FLAG_MANAGED_IRQ =BIT (HK_TYPE_MANAGED_IRQ ), -HK_FLAG_KTHREAD =BIT (HK_TYPE_KTHREAD ), +HK_FLAG_KERNEL_NOISE =BIT (HK_TYPE_KERNEL_NOISE ), };DEFINE_STATIC_KEY_FALSE (housekeeping_overridden);
@@ -96,7 +91,7 @@ void __init housekeeping_init(void)static_branch_enable (&housekeeping_overridden); -if (housekeeping.flags &HK_FLAG_TICK ) +if (housekeeping.flags &HK_FLAG_KERNEL_NOISE )sched_tick_offload_init ();for_each_set_bit (type, &housekeeping.flags,HK_TYPE_MAX ) {
@@ -120,7 +115,7 @@ static int __init housekeeping_setup(char *str, unsigned long flags)unsigned int first_cpu;int err =0 ; -if ((flags &HK_FLAG_TICK ) && !(housekeeping.flags &HK_FLAG_TICK )) { +if ((flags &HK_FLAG_KERNEL_NOISE ) && !(housekeeping.flags &HK_FLAG_KERNEL_NOISE )) {if (!IS_ENABLED (CONFIG_NO_HZ_FULL )) {pr_warn ("Housekeeping: nohz unsupported." " Build with CONFIG_NO_HZ_FULL\n" );
@@ -176,7 +171,7 @@ static int __init housekeeping_setup(char *str, unsigned long flags)housekeeping_setup_type (type, housekeeping_staging); } -if ((flags &HK_FLAG_TICK ) && !(housekeeping.flags &HK_FLAG_TICK )) +if ((flags &HK_FLAG_KERNEL_NOISE ) && !(housekeeping.flags &HK_FLAG_KERNEL_NOISE ))tick_nohz_full_setup (non_housekeeping_mask); housekeeping.flags |= flags;
@@ -194,8 +189,7 @@ static int __init housekeeping_nohz_full_setup(char *str) {unsigned long flags; - flags =HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER |HK_FLAG_RCU | -HK_FLAG_MISC |HK_FLAG_KTHREAD ; + flags =HK_FLAG_KERNEL_NOISE ;return housekeeping_setup (str, flags); }
@@ -214,8 +208,7 @@ static int __init housekeeping_isolcpus_setup(char *str)*/ if (!strncmp (str,"nohz," ,5 )) { str +=5 ; - flags |=HK_FLAG_TICK |HK_FLAG_WQ |HK_FLAG_TIMER | -HK_FLAG_RCU |HK_FLAG_MISC |HK_FLAG_KTHREAD ; + flags |=HK_FLAG_KERNEL_NOISE ;continue ; }
PATCH RESEND v4 4/4 sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
In reply to Waiman LongAs all the non-domain and non-managed_irq housekeeping types have been unified to HK_TYPE_KERNEL_NOISE, replace all these references in the scheduler to use HK_TYPE_KERNEL_NOISE.
--- kernel/sched/core.c | 12 ++++++------ kernel/sched/fair.c | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-)
kernel/sched/core.c +6 -6
@@ -1114,13 +1114,13 @@ int get_nohz_timer_target(void)struct sched_domain *sd;const struct cpumask *hk_mask; -if (housekeeping_cpu (cpu,HK_TYPE_TIMER )) { +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE )) {if (!idle_cpu (cpu))return cpu; default_cpu = cpu; } - hk_mask =housekeeping_cpumask (HK_TYPE_TIMER ); + hk_mask =housekeeping_cpumask (HK_TYPE_KERNEL_NOISE );guard (rcu)();
@@ -1135,7 +1135,7 @@ int get_nohz_timer_target(void) }if (default_cpu ==-1 ) - default_cpu =housekeeping_any_cpu (HK_TYPE_TIMER ); + default_cpu =housekeeping_any_cpu (HK_TYPE_KERNEL_NOISE );return default_cpu; }
@@ -5526,7 +5526,7 @@ void sched_tick(void)unsigned long hw_pressure;u64 resched_latency; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))arch_scale_freq_tick ();sched_clock_tick ();
@@ -5652,7 +5652,7 @@ static void sched_tick_start(int cpu)int os;struct tick_work *twork; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))return ;WARN_ON_ONCE (!tick_work_cpu);
@@ -5673,7 +5673,7 @@ static void sched_tick_stop(int cpu)struct tick_work *twork;int os; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))return ;WARN_ON_ONCE (!tick_work_cpu);
kernel/sched/fair.c +3 -2
@@ -12208,7 +12208,7 @@ static inline int find_new_ilb(void)const struct cpumask *hk_mask;int ilb_cpu; - hk_mask =housekeeping_cpumask (HK_TYPE_MISC ); + hk_mask =housekeeping_cpumask (HK_TYPE_KERNEL_NOISE );for_each_cpu_and (ilb_cpu, nohz.idle_cpus_mask, hk_mask) {
@@ -12226,7 +12226,8 @@ static inline int find_new_ilb(void)* Kick a CPU to do the NOHZ balancing, if it is time for it, via a cross-CPU * SMP function call (IPI). * -* We pick the first idle CPU in the HK_TYPE_MISC housekeeping set (if there is one). +* We pick the first idle CPU in the HK_TYPE_KERNEL_NOISE housekeeping set +* (if there is one). */ static void kick_ilb (unsigned int flags) {
Signature · 1 line
2.43.5
[tip: sched/core] sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
The following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: c907cd44a108eff7005a2b5689bb91f50637df8b Gitweb: https://git.kernel.org/tip/c907cd44a108eff7005a2b5689bb91f50637df8b Author: Waiman Long <[email protected]> AuthorDate: Wed, 30 Oct 2024 13:52:53 -04:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Mon, 02 Dec 2024 12:24:28 +01:00
sched: Unify HK_TYPE_{TIMER|TICK|MISC} to HK_TYPE_KERNEL_NOISE
As all the non-domain and non-managed_irq housekeeping types have been unified to HK_TYPE_KERNEL_NOISE, replace all these references in the scheduler to use HK_TYPE_KERNEL_NOISE.
--- kernel/sched/core.c | 12 ++++++------ kernel/sched/fair.c | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-)
kernel/sched/core.c +6 -6
@@ -1170,13 +1170,13 @@ int get_nohz_timer_target(void)struct sched_domain *sd;const struct cpumask *hk_mask; -if (housekeeping_cpu (cpu,HK_TYPE_TIMER )) { +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE )) {if (!idle_cpu (cpu))return cpu; default_cpu = cpu; } - hk_mask =housekeeping_cpumask (HK_TYPE_TIMER ); + hk_mask =housekeeping_cpumask (HK_TYPE_KERNEL_NOISE );guard (rcu)();
@@ -1191,7 +1191,7 @@ int get_nohz_timer_target(void) }if (default_cpu ==-1 ) - default_cpu =housekeeping_any_cpu (HK_TYPE_TIMER ); + default_cpu =housekeeping_any_cpu (HK_TYPE_KERNEL_NOISE );return default_cpu; }
@@ -5634,7 +5634,7 @@ void sched_tick(void)unsigned long hw_pressure;u64 resched_latency; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))arch_scale_freq_tick ();sched_clock_tick ();
@@ -5773,7 +5773,7 @@ static void sched_tick_start(int cpu)int os;struct tick_work *twork; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))return ;WARN_ON_ONCE (!tick_work_cpu);
@@ -5794,7 +5794,7 @@ static void sched_tick_stop(int cpu)struct tick_work *twork;int os; -if (housekeeping_cpu (cpu,HK_TYPE_TICK )) +if (housekeeping_cpu (cpu,HK_TYPE_KERNEL_NOISE ))return ;WARN_ON_ONCE (!tick_work_cpu);
kernel/sched/fair.c +3 -2
@@ -12203,7 +12203,7 @@ static inline int find_new_ilb(void)const struct cpumask *hk_mask;int ilb_cpu; - hk_mask =housekeeping_cpumask (HK_TYPE_MISC ); + hk_mask =housekeeping_cpumask (HK_TYPE_KERNEL_NOISE );for_each_cpu_and (ilb_cpu, nohz.idle_cpus_mask, hk_mask) {
@@ -12221,7 +12221,8 @@ static inline int find_new_ilb(void)* Kick a CPU to do the NOHZ balancing, if it is time for it, via a cross-CPU * SMP function call (IPI). * -* We pick the first idle CPU in the HK_TYPE_MISC housekeeping set (if there is one). +* We pick the first idle CPU in the HK_TYPE_KERNEL_NOISE housekeeping set +* (if there is one). */ static void kick_ilb (unsigned int flags) {