aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorPetr Mladek <[email protected]>2020-12-14 19:03:18 -0800
committerLinus Torvalds <[email protected]>2020-12-15 12:13:36 -0800
commitebb2bdcef8a00d59b27d3532c423110559821e1d (patch)
tree68431e64efe138f29cef47043fe6d5e4dc16e5a3 /tools/perf/scripts/python/flamegraph.py
parentf630c7c6f10546ebff15c3a856e7949feb7a2372 (diff)
kthread_worker: document CPU hotplug handling
The kthread worker API is simple. In short, it allows to create, use, and destroy workers. kthread_create_worker_on_cpu() just allows to bind a newly created worker to a given CPU. It is up to the API user how to handle CPU hotplug. They have to decide how to handle pending work items, prevent queuing new ones, and restore the functionality when the CPU goes off and on. There are few catches: + The CPU affinity gets lost when it is scheduled on an offline CPU. + The worker might not exist when the CPU was off when the user created the workers. A good practice is to implement two CPU hotplug callbacks and destroy/create the worker when CPU goes down/up. Mention this in the function description. [[email protected]: grammar tweaks] Link: https://lore.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Reported-by: Zhang Qiang <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions