News for hackers. Stuff that matters.
Re:How long does it take to make a context switch? (2010) by otabdeveloper on Wednesday March 22, 2017 @01:24PM (#13932874)
> Does the CPU interrupt threads running happily on cores even when there are no other threads which want to run or which have affinity that would allow them to run on that core?

Yes. Even if you are careful to ever run only one process (so: no monitoring, no logging, no VM's, no 'middleware', etc.) and limit the number of threads to strictly equal the number of processors, you still have background kernel threads that force your process to context switch.

Re:How long does it take to make a context switch? (2010) by gpderetta on Wednesday March 22, 2017 @01:33PM (#13932940)
Tough you can instruct the kernel not to run anything (not even interrupt handlers) on specific cores, except for manually pinned processes.
Re:How long does it take to make a context switch? (2010) by monocasa on Wednesday March 22, 2017 @02:00PM (#13933178)
At a minimum you still need timer and TLB IPI shootdown interrupts hitting every core, just to have a working SMP system.
Re:How long does it take to make a context switch? (2010) by gpderetta on Wednesday March 22, 2017 @02:06PM (#13933224)
the cpu does need to handle IPI of course but not sure about timers.