Commit fc0763f53e3ff6a6bfa66934662a3446b9ca6f16

Authored by Shi, Alex
Committed by Paul E. McKenney
1 parent d7bd2d68aa

nohz: Remove nohz_cpu_mask

RCU no longer uses this global variable, nor does anyone else.  This
commit therefore removes this variable.  This reduces memory footprint
and also removes some atomic instructions and memory barriers from
the dyntick-idle path.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Showing 3 changed files with 0 additions and 18 deletions Side-by-side Diff

include/linux/sched.h
... ... @@ -270,7 +270,6 @@
270 270  
271 271 extern int runqueue_is_locked(int cpu);
272 272  
273   -extern cpumask_var_t nohz_cpu_mask;
274 273 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
275 274 extern void select_nohz_load_balancer(int stop_tick);
276 275 extern int get_nohz_timer_target(void);
... ... @@ -5980,15 +5980,6 @@
5980 5980 }
5981 5981  
5982 5982 /*
5983   - * In a system that switches off the HZ timer nohz_cpu_mask
5984   - * indicates which cpus entered this state. This is used
5985   - * in the rcu update to wait only for active cpus. For system
5986   - * which do not switch off the HZ timer nohz_cpu_mask should
5987   - * always be CPU_BITS_NONE.
5988   - */
5989   -cpumask_var_t nohz_cpu_mask;
5990   -
5991   -/*
5992 5983 * Increase the granularity value when there are more CPUs,
5993 5984 * because with more CPUs the 'effective latency' as visible
5994 5985 * to users decreases. But the relationship is not linear,
... ... @@ -8200,8 +8191,6 @@
8200 8191 */
8201 8192 current->sched_class = &fair_sched_class;
8202 8193  
8203   - /* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
8204   - zalloc_cpumask_var(&nohz_cpu_mask, GFP_NOWAIT);
8205 8194 #ifdef CONFIG_SMP
8206 8195 zalloc_cpumask_var(&sched_domains_tmpmask, GFP_NOWAIT);
8207 8196 #ifdef CONFIG_NO_HZ
kernel/time/tick-sched.c
... ... @@ -139,7 +139,6 @@
139 139 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
140 140 unsigned long flags;
141 141  
142   - cpumask_clear_cpu(cpu, nohz_cpu_mask);
143 142 ts->idle_waketime = now;
144 143  
145 144 local_irq_save(flags);
... ... @@ -389,9 +388,6 @@
389 388 else
390 389 expires.tv64 = KTIME_MAX;
391 390  
392   - if (delta_jiffies > 1)
393   - cpumask_set_cpu(cpu, nohz_cpu_mask);
394   -
395 391 /* Skip reprogram of event if its not changed */
396 392 if (ts->tick_stopped && ktime_equal(expires, dev->next_event))
397 393 goto out;
... ... @@ -441,7 +437,6 @@
441 437 * softirq.
442 438 */
443 439 tick_do_update_jiffies64(ktime_get());
444   - cpumask_clear_cpu(cpu, nohz_cpu_mask);
445 440 }
446 441 raise_softirq_irqoff(TIMER_SOFTIRQ);
447 442 out:
... ... @@ -524,7 +519,6 @@
524 519 /* Update jiffies first */
525 520 select_nohz_load_balancer(0);
526 521 tick_do_update_jiffies64(now);
527   - cpumask_clear_cpu(cpu, nohz_cpu_mask);
528 522  
529 523 #ifndef CONFIG_VIRT_CPU_ACCOUNTING
530 524 /*