Nathan Doromal
Nathan Doromal

Reputation: 3547

How to bind certain kernel threads to a given core?

I have a number of kernel threads that I want to get off of a given core for performance reasons. Some of these I am able to move using taskset however there are others I cannot.

In particular I see processes like migration, watchdog, rcuc, etc. that do not respond to my attempt to rebind them.

For example, if I try to rebind the watchdog process, I get the following:

# taskset -pc 0 207
pid 207's current affinity list: 0
sched_setaffinity: Invalid argument
failed to set pid 207's affinity.

How can I get these off of the cores so I can properly isolate them for performance reasons?

I suspect these processes are interfering with my full dynticks mode.

Upvotes: 4

Views: 4242

Answers (1)

thkala
thkala

Reputation: 86333

Several kernel threads are tied to a specific core, in order to effect capabilities needed by the SMP infrastructure, such as synchronization, interrupt handling and so on. The kworker, migration and ksoftirqd threads, for example, usually have one instance per virtual processor (e.g. 8 threads on a 4-core 8-thread CPU).

You cannot (and should not be able to) move those threads - without them that processor would not be fully usable by the system any more.

Why exactly do you want to move those threads anyway?

Upvotes: 3

Related Questions