←back to thread

218 points chmaynard | 1 comments | | HN request time: 0s | source
Show context
hamilyon2 ◴[] No.41887445[source]
How tight is scheduler coupled to the rest of kernel code?

If one wanted to drastically simplify scheduler, for example for some scientific application which doesn't care about preemption at all, can it be done in clean, modular way? And will be any benefit?

replies(4): >>41887725 #>>41887861 #>>41888151 #>>41888319 #
1. p_l ◴[] No.41887725[source]
If you want to run a set of processes with as little preemption as possible, for example in HPC setting, your most powerful option is to reboot the system with a selection of cores (exact amount will differ on your needs) set as isolated cpus and manually put your task there with taskset - but then you need to really manually allocate tasks to CPUs, it's trivial to end up with all tasks on wrong CPU.

The standard way is to set interrupt masks so they don't go to "work" cpus and use cpusets to only allow specific cgroup to execute on given cpuset.