]> Git Repo - linux.git/commit
workqueue: reimplement work_on_cpu() using system_wq
authorTejun Heo <[email protected]>
Tue, 18 Sep 2012 19:48:43 +0000 (12:48 -0700)
committerTejun Heo <[email protected]>
Wed, 19 Sep 2012 17:13:12 +0000 (10:13 -0700)
commited48ece27cd3d5ee0354c32bbaec0f3e1d4715c3
tree9ead3fba10ccd3118e6c4f38ed61cbf2bb2cbb3f
parent960bd11bf2daf669d0d910428fd9ef5a15c3d7cb
workqueue: reimplement work_on_cpu() using system_wq

The existing work_on_cpu() implementation is hugely inefficient.  It
creates a new kthread, execute that single function and then let the
kthread die on each invocation.

Now that system_wq can handle concurrent executions, there's no
advantage of doing this.  Reimplement work_on_cpu() using system_wq
which makes it simpler and way more efficient.

stable: While this isn't a fix in itself, it's needed to fix a
        workqueue related bug in cpufreq/powernow-k8.  AFAICS, this
        shouldn't break other existing users.

Signed-off-by: Tejun Heo <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: [email protected]
kernel/workqueue.c
This page took 0.054716 seconds and 4 git commands to generate.