Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191420
b: refs/heads/master
c: cc631fb
h: refs/heads/master
v: v3
  • Loading branch information
Paul E. McKenney authored and Tejun Heo committed May 6, 2010
1 parent f3a41a7 commit 2a34d26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: 94458d5ecb3da844823cc191e73e5c5ead98a464
refs/heads/master: cc631fb732b8ccd6a0cc45557475ea09b0c21a68
21 changes: 11 additions & 10 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -8931,6 +8931,15 @@ struct cgroup_subsys cpuacct_subsys = {
#ifndef CONFIG_SMP

void synchronize_sched_expedited(void)
{
}
EXPORT_SYMBOL_GPL(synchronize_sched_expedited);

#else /* #ifndef CONFIG_SMP */

static atomic_t synchronize_sched_expedited_count = ATOMIC_INIT(0);

static int synchronize_sched_expedited_cpu_stop(void *data)
{
/*
* There must be a full memory barrier on each affected CPU
Expand All @@ -8943,16 +8952,7 @@ void synchronize_sched_expedited(void)
* necessary. Do smp_mb() anyway for documentation and
* robustness against future implementation changes.
*/
smp_mb();
}
EXPORT_SYMBOL_GPL(synchronize_sched_expedited);

#else /* #ifndef CONFIG_SMP */

static atomic_t synchronize_sched_expedited_count = ATOMIC_INIT(0);

static int synchronize_sched_expedited_cpu_stop(void *data)
{
smp_mb(); /* See above comment block. */
return 0;
}

Expand Down Expand Up @@ -8990,6 +8990,7 @@ void synchronize_sched_expedited(void)
get_online_cpus();
}
atomic_inc(&synchronize_sched_expedited_count);
smp_mb__after_atomic_inc(); /* ensure post-GP actions seen after GP. */
put_online_cpus();
}
EXPORT_SYMBOL_GPL(synchronize_sched_expedited);
Expand Down

0 comments on commit 2a34d26

Please sign in to comment.