Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136476
b: refs/heads/master
c: e1d9ec6
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Mike Travis committed Jan 16, 2009
1 parent 1fbcb25 commit e1bcc35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 68564a46976017496c2227660930d81240f82355
refs/heads/master: e1d9ec6246a2668a5d037f529877efb7cf176af8
8 changes: 7 additions & 1 deletion trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,8 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
}

#ifdef CONFIG_SMP
static struct workqueue_struct *work_on_cpu_wq __read_mostly;

struct work_for_cpu {
struct work_struct work;
long (*fn)(void *);
Expand Down Expand Up @@ -1001,7 +1003,7 @@ long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg)
INIT_WORK(&wfc.work, do_work_for_cpu);
wfc.fn = fn;
wfc.arg = arg;
schedule_work_on(cpu, &wfc.work);
queue_work_on(cpu, work_on_cpu_wq, &wfc.work);
flush_work(&wfc.work);

return wfc.ret;
Expand All @@ -1019,4 +1021,8 @@ void __init init_workqueues(void)
hotcpu_notifier(workqueue_cpu_callback, 0);
keventd_wq = create_workqueue("events");
BUG_ON(!keventd_wq);
#ifdef CONFIG_SMP
work_on_cpu_wq = create_workqueue("work_on_cpu");
BUG_ON(!work_on_cpu_wq);
#endif
}

0 comments on commit e1bcc35

Please sign in to comment.