Userspace starving kernel threads for CPU cycle.
valdis.kletnieks at vt.edu
valdis.kletnieks at vt.edu
Fri Jun 8 18:22:23 EDT 2018
On Fri, 08 Jun 2018 16:49:48 -0500, Àbéjídé Àyodélé said:
> I have a machine with 80 cores and I had a burst of requesting more cpu
> period than the available number of CPUs, my guess was that this resulted
> in starvation for the kernel threads, is my guess plausible or do kernel
> threads get preference for scheduling.
The short answer: 'man 7 sched'
The long answer:
The first question is, of course: "Did you see any actual evidence of kernel
threads being starved?"
In general, CPU-bound execution threads get lower priority than threads that
are I/O bound or otherwise bursty in behavior, so kernel threads (which almost
never go CPU bound) end up getting scheduled before cpu-bound threads.
However, it *is* possible to shoot yourself in the foot by setting artificially
high priorities on CPU-bound processes and/or setting processor affinity or
fully tickless kernels to end up accidentally starving some kernel threads.
More information about the Kernelnewbies
mailing list