[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230824043753.2049500-1-liuchao173@huawei.com>
Date: Thu, 24 Aug 2023 05:37:53 +0100
From: Liu Chao <liuchao173@...wei.com>
To: <linux-kernel@...r.kernel.org>
CC: <mingo@...hat.com>, <peterz@...radead.org>,
<juri.lelli@...hat.com>, <vincent.guittot@...aro.org>,
<louhongxiang@...wei.com>, <chenjiashang1@...wei.com>,
<wangyanan55@...wei.com>
Subject: [PATCH] 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 <liuchao173@...wei.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
Powered by blists - more mailing lists