lkml.org 
[lkml]   [2023]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched: Increase MAX_SHARES
Date
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 <liuchao173@huawei.com>
---
kernel/sched/sched.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 0f871e9b169c..2cc1cc7dd71a 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -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 *);
--
2.23.0
\
 
 \ /
  Last update: 2023-08-24 06:40    [W:0.042 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site