aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/sysctl.h
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2020-12-14 19:03:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 12:13:36 -0800
commitebb2bdcef8a00d59b27d3532c423110559821e1d (patch)
tree68431e64efe138f29cef47043fe6d5e4dc16e5a3 /include/uapi/linux/sysctl.h
parentkthread: add kthread_work tracepoints (diff)
downloadlinux-dev-ebb2bdcef8a00d59b27d3532c423110559821e1d.tar.xz
linux-dev-ebb2bdcef8a00d59b27d3532c423110559821e1d.zip
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. [akpm@linux-foundation.org: grammar tweaks] Link: https://lore.kernel.org/r/20201028073031.4536-1-qiang.zhang@windriver.com Link: https://lkml.kernel.org/r/20201102101039.19227-1-pmladek@suse.com Reported-by: Zhang Qiang <Qiang.Zhang@windriver.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/uapi/linux/sysctl.h')
0 files changed, 0 insertions, 0 deletions