Skip to content

Commit c907cd4

Browse files
Waiman-LongPeter Zijlstra
authored andcommitted
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. Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6010d24 commit c907cd4

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

kernel/sched/core.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,13 +1170,13 @@ int get_nohz_timer_target(void)
11701170
struct sched_domain *sd;
11711171
const struct cpumask *hk_mask;
11721172

1173-
if (housekeeping_cpu(cpu, HK_TYPE_TIMER)) {
1173+
if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE)) {
11741174
if (!idle_cpu(cpu))
11751175
return cpu;
11761176
default_cpu = cpu;
11771177
}
11781178

1179-
hk_mask = housekeeping_cpumask(HK_TYPE_TIMER);
1179+
hk_mask = housekeeping_cpumask(HK_TYPE_KERNEL_NOISE);
11801180

11811181
guard(rcu)();
11821182

@@ -1191,7 +1191,7 @@ int get_nohz_timer_target(void)
11911191
}
11921192

11931193
if (default_cpu == -1)
1194-
default_cpu = housekeeping_any_cpu(HK_TYPE_TIMER);
1194+
default_cpu = housekeeping_any_cpu(HK_TYPE_KERNEL_NOISE);
11951195

11961196
return default_cpu;
11971197
}
@@ -5634,7 +5634,7 @@ void sched_tick(void)
56345634
unsigned long hw_pressure;
56355635
u64 resched_latency;
56365636

5637-
if (housekeeping_cpu(cpu, HK_TYPE_TICK))
5637+
if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE))
56385638
arch_scale_freq_tick();
56395639

56405640
sched_clock_tick();
@@ -5773,7 +5773,7 @@ static void sched_tick_start(int cpu)
57735773
int os;
57745774
struct tick_work *twork;
57755775

5776-
if (housekeeping_cpu(cpu, HK_TYPE_TICK))
5776+
if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE))
57775777
return;
57785778

57795779
WARN_ON_ONCE(!tick_work_cpu);
@@ -5794,7 +5794,7 @@ static void sched_tick_stop(int cpu)
57945794
struct tick_work *twork;
57955795
int os;
57965796

5797-
if (housekeeping_cpu(cpu, HK_TYPE_TICK))
5797+
if (housekeeping_cpu(cpu, HK_TYPE_KERNEL_NOISE))
57985798
return;
57995799

58005800
WARN_ON_ONCE(!tick_work_cpu);

kernel/sched/fair.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12203,7 +12203,7 @@ static inline int find_new_ilb(void)
1220312203
const struct cpumask *hk_mask;
1220412204
int ilb_cpu;
1220512205

12206-
hk_mask = housekeeping_cpumask(HK_TYPE_MISC);
12206+
hk_mask = housekeeping_cpumask(HK_TYPE_KERNEL_NOISE);
1220712207

1220812208
for_each_cpu_and(ilb_cpu, nohz.idle_cpus_mask, hk_mask) {
1220912209

@@ -12221,7 +12221,8 @@ static inline int find_new_ilb(void)
1222112221
* Kick a CPU to do the NOHZ balancing, if it is time for it, via a cross-CPU
1222212222
* SMP function call (IPI).
1222312223
*
12224-
* We pick the first idle CPU in the HK_TYPE_MISC housekeeping set (if there is one).
12224+
* We pick the first idle CPU in the HK_TYPE_KERNEL_NOISE housekeeping set
12225+
* (if there is one).
1222512226
*/
1222612227
static void kick_ilb(unsigned int flags)
1222712228
{

0 commit comments

Comments
 (0)