The article refers to kernel 2.6.27 to explain scheduling domain implementation and policies used for the scheduling domains. The scheduling domains' policies are controlled by a few flags described in Table 1.
A combination of the above policies is used along with different scheduling domains to fulfill different requirements of each scheduling domain. The following examples show the policy flags used by different scheduling domains:
• HT Level Scheduling Domain initialisation: AB defined in the header includellinux/topology. h, SD_ SIBLINGjNIT initialises scheduling domains flags to:
• Physical Level Scheduling Domain initialisation: As defined in the same header file topology.h, SD_CPU_ INIT initialises scheduling domain flags to:
• NUMA Level Scheduling Domain initialisation: Again, in the topology. h file, SD _ALLNODES jNIT initialises scheduling domain flags to:
It is worth discussing a few important flags now. Every scheduling domain sets the flag SD _LOAD_ BALANCE, Le., every domain is eligible for load balancing. This means that although load balancing at higher domains is costlier, it is not ruled out. Similarly, every scheduling domain sets the flag SD_BALANCE_ NEWIDLE; which means that if the CPU is going to become idle, it attempts to pull processes from other CPUs, to improve processor utilisation.
However, observe that only the HT Level Scheduling Domain and Physical Level Scheduling Domain set the flag SD _BALANCE_FORK and SD _BALANCE_EXEC. Since forking or cloning refer to existing memory (parent process context, mm context, etc), it is recommended to schedule the process in the same node group.