# Re: Kernel thread's CPU affinity with isolcpus kernel boot argument

- From: Daniel Bristot de Oliveira \<hidden\>
- Date: 2016-02-25 15:21:48 
- List: linux-rt-users
- Page: https://ratatoskr.run/linux-rt-users/2016/02/16485934
- Thread: https://ratatoskr.run/linux-rt-users/2016/01/16485826/t.md

```text


On 02/25/2016 11:18 AM, Sebastian Andrzej Siewior wrote:
> not that I am aware of. There are a few per-CPU threads which have to
> stay the way they are. I would have expected that others like kworker/u*
> respect the isol CPUs and stay away.

Isolcpus is applied only for user-space threads. For instance, you
still need to move rcu offload callbacks away from isolated CPUs, and
all other kernel threads as well.

In the special case of kworker/u* threads, you need to use a special
interface to do it. The interface is the following file:

/sys/devices/virtual/workqueue/cpumask

It was implemented on the following commit:

042f7df workqueue: Allow modifying low level unbound workqueue cpumask

But the default CPU mask is the "cpu_possible_mask".

Sometime ago I sent a patch to modify the default mask of the kworker/u*
threads, to avoid them on isolated CPUs by default, but it was not
acked. It was not explicitly nacked, though.

http://www.gossamer-threads.com/lists/linux/kernel/2218495

Should I try it again?

-- Daniel
```
