Skip to content
Advertisement

Unbound workqueue’s kthreads CPU affinity

Is there a way to set CPU affinity for unbound workqueue’s kthreads (those that named kthread/uXX:y)? Something like cpu mask for regular workqueues. Is it a good idea to set it for each kthread using taskset?

Advertisement

Answer

Workqueue subsystem exports sysfs attribute for setting cpu affinity for unbound workers. Code can be found in Workqueue.c:

JavaScript

So any user space application can write to sysfs descriptor to set unbound workqueue cpu mask.

I hope this answers your query.

Advertisement