diff options
author | Thomas Gleixner <[email protected]> | 2017-04-12 22:07:28 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2017-04-15 12:20:53 +0200 |
commit | 0e8d6a9336b487a1dd6f1991ff376e669d4c87c6 (patch) | |
tree | 11bf45da14998976aeb13623f52673b64af35177 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 048c9b954e20396e0c45ee778466994d1be2e612 (diff) |
workqueue: Provide work_on_cpu_safe()
work_on_cpu() is not protected against CPU hotplug. For code which requires
to be either executed on an online CPU or to fail if the CPU is not
available the callsite would have to protect against CPU hotplug.
Provide a function which does get/put_online_cpus() around the call to
work_on_cpu() and fails the call with -ENODEV if the target CPU is not
online.
Preparatory patch to convert several racy task affinity manipulations.
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Sebastian Siewior <[email protected]>
Cc: Lai Jiangshan <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Len Brown <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions