Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327167
b: refs/heads/master
c: e42986d
h: refs/heads/master
i:
  327165: 817222a
  327163: 72b20b5
  327159: d98a339
  327151: 72b80f8
  327135: bb65e8d
  327103: 88dbcc5
  327039: 0a2d715
  326911: 55f8f71
  326655: 4e22137
v: v3
  • Loading branch information
Joonsoo Kim authored and Tejun Heo committed Aug 16, 2012
1 parent 79bbf23 commit 647ee45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: b75cac9368fa91636e17d0f7950b35d837154e14
refs/heads/master: e42986de481238204f6e0b0f4434da428895c20b
10 changes: 8 additions & 2 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,9 +1356,15 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
if (!(wq->flags & WQ_UNBOUND)) {
struct global_cwq *gcwq = get_work_gcwq(work);

if (gcwq && gcwq->cpu != WORK_CPU_UNBOUND)
/*
* If we cannot get the last gcwq from @work directly,
* select the last CPU such that it avoids unnecessarily
* triggering non-reentrancy check in __queue_work().
*/
lcpu = cpu;
if (gcwq)
lcpu = gcwq->cpu;
else
if (lcpu == WORK_CPU_UNBOUND)
lcpu = raw_smp_processor_id();
} else {
lcpu = WORK_CPU_UNBOUND;
Expand Down

0 comments on commit 647ee45

Please sign in to comment.