Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125317
b: refs/heads/master
c: 6a7b3dc
h: refs/heads/master
i:
  125315: 38bd0ec
v: v3
  • Loading branch information
Rusty Russell authored and Ingo Molnar committed Nov 24, 2008
1 parent eb49b8b commit 872b9c2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c99e9ad47d9c082bd096f42fb49e397b05d58a8
refs/heads/master: 6a7b3dc3440f7b5a9b67594af01ed562cdeb41e4
2 changes: 1 addition & 1 deletion trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ extern void init_idle_bootup_task(struct task_struct *idle);
extern int runqueue_is_locked(void);
extern void task_rq_unlock_wait(struct task_struct *p);

extern cpumask_t nohz_cpu_mask;
extern cpumask_var_t nohz_cpu_mask;
#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
extern int select_nohz_load_balancer(int cpu);
#else
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/rcuclassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static void rcu_start_batch(struct rcu_ctrlblk *rcp)
* unnecessarily.
*/
smp_mb();
cpus_andnot(rcp->cpumask, cpu_online_map, nohz_cpu_mask);
cpumask_andnot(&rcp->cpumask, cpu_online_mask, nohz_cpu_mask);

rcp->signaled = 0;
}
Expand Down
7 changes: 5 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5870,9 +5870,9 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
* indicates which cpus entered this state. This is used
* in the rcu update to wait only for active cpus. For system
* which do not switch off the HZ timer nohz_cpu_mask should
* always be CPU_MASK_NONE.
* always be CPU_BITS_NONE.
*/
cpumask_t nohz_cpu_mask = CPU_MASK_NONE;
cpumask_var_t nohz_cpu_mask;

/*
* Increase the granularity value when there are more CPUs,
Expand Down Expand Up @@ -8274,6 +8274,9 @@ void __init sched_init(void)
*/
current->sched_class = &fair_sched_class;

/* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
alloc_bootmem_cpumask_var(&nohz_cpu_mask);

scheduler_running = 1;
}

Expand Down
10 changes: 5 additions & 5 deletions trunk/kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void tick_nohz_update_jiffies(void)
if (!ts->tick_stopped)
return;

cpu_clear(cpu, nohz_cpu_mask);
cpumask_clear_cpu(cpu, nohz_cpu_mask);
now = ktime_get();
ts->idle_waketime = now;

Expand Down Expand Up @@ -283,7 +283,7 @@ void tick_nohz_stop_sched_tick(int inidle)
if ((long)delta_jiffies >= 1) {

if (delta_jiffies > 1)
cpu_set(cpu, nohz_cpu_mask);
cpumask_set_cpu(cpu, nohz_cpu_mask);
/*
* nohz_stop_sched_tick can be called several times before
* the nohz_restart_sched_tick is called. This happens when
Expand All @@ -296,7 +296,7 @@ void tick_nohz_stop_sched_tick(int inidle)
/*
* sched tick not stopped!
*/
cpu_clear(cpu, nohz_cpu_mask);
cpumask_clear_cpu(cpu, nohz_cpu_mask);
goto out;
}

Expand Down Expand Up @@ -354,7 +354,7 @@ void tick_nohz_stop_sched_tick(int inidle)
* softirq.
*/
tick_do_update_jiffies64(ktime_get());
cpu_clear(cpu, nohz_cpu_mask);
cpumask_clear_cpu(cpu, nohz_cpu_mask);
}
raise_softirq_irqoff(TIMER_SOFTIRQ);
out:
Expand Down Expand Up @@ -432,7 +432,7 @@ void tick_nohz_restart_sched_tick(void)
select_nohz_load_balancer(0);
now = ktime_get();
tick_do_update_jiffies64(now);
cpu_clear(cpu, nohz_cpu_mask);
cpumask_clear_cpu(cpu, nohz_cpu_mask);

/*
* We stopped the tick in idle. Update process times would miss the
Expand Down

0 comments on commit 872b9c2

Please sign in to comment.