sched: Increase MAX_SHARES
PATCH 1/1 sched: Increase MAX_SHARES
When the number of CPUs is large, such as 320 CPUs, create two cgroups in /sys/fs/cgroup/cpu/: system.slice and machine.slice. system.slice uses 0.5 CPU, and machine.slice uses the reset 319.5 CPUs. The cpu.shares of system.slice is set to 1024 by default, so in order to achieve this effect, machine.slice needs to be set to 319.5 * 1024 / 0.5 = 654336, which is greater than 1<<18, so it is increased to 1<<20.
Signed-off-by Liu Chao <[email protected]>
--- kernel/sched/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/sched.h +1 -1
@@ -482,7 +482,7 @@ struct task_group {* limitation from this.) */ #define MIN_SHARES (1UL << 1) -#define MAX_SHARES (1UL << 18) +#define MAX_SHARES (1UL << 20)#endif typedef int (*tg_visitor )(struct task_group *,void *);
Signature · 1 line
2.23.0