how to bind a task to "dedicated" core? (using cgroups/cpusets?)
I launch my application, and I bind one of it threads using sched_setaffinity to the certain core. This thread is latency-critical so I want to move everything else from this core.
I've already moved interrupts from this core.
Now I want to be sure that no other tasks are using this core. As I inderstand I should use cgroups (cpusets?). How can I ensure that no other processes (and no other threads of my application) are using this core?
Responses
The isolcpus kernel boot parameter can do this:
My understanding is that isolcpus removes a particular core from the task scheduler, so unless something manually requests a process be placed on that core (sched_setaffinity() and friends, handling a hard IRQ) then nothing else will be run on there.
However this is not my speciality area so others may have more insight than I do.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
