https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127651

--- Comment #2 from Itamar Turner-Trauring <itamar at pythonspeed dot com> ---
(In reply to Drea Pinski from comment #1)
> Why is cgroups not limiting taskset too?
> That seems like a kernel/docker/cgroups issue because tasksets is normal way
> to pin tasks.
> 
> Have you wrote to them about this issue?

These are two different mechanisms.

taskset (a CLI wrapper for sched_setaffinity) limits to specific named cores.
I.e. "taskset -c 0,1,7 myprogram" only allows myprogram to use cores 0, 1, and
7.

cgroups has far more flexibility. For example, you can say "I want the
_equivalent_ of 2 cores" but it's up to the scheduler to pick which cores at
runtime. So it's not pinning. (cgroups does have a mechanism for pinning cores,
too.)

So, no, it's not a cgroups bug. It's cgroups doing what the user asked, "give
me the equivalent of 2 cores and I don't care which". It's not pinning.

Reply via email to