mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: change MAX_SHARES to NR_CPUS
@ 2025-08-12  9:28 yaozhenguo
  2025-08-12 10:00 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: yaozhenguo @ 2025-08-12  9:28 UTC (permalink / raw)
  To: mingo, peterz, vincent.guittot; +Cc: linux-kernel, yaozhenguo, ZhenguoYao

From: ZhenguoYao <yaozhenguo1@gmail.com>

As the number of cores in modern CPUs continues to increase,
256 * 1024 is no longer sufficient to meet the requirements.
Therefore, MAX_SHARES is being modified to NR_CPUS * 1024.

Signed-off-by: ZhenguoYao <yaozhenguo1@gmail.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 be9745d104f7..5c219e34f48d 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -510,7 +510,7 @@ struct task_group {
  *  limitation from this.)
  */
 #define MIN_SHARES		(1UL <<  1)
-#define MAX_SHARES		(1UL << 18)
+#define MAX_SHARES		(NR_CPUS * 1024UL)
 #endif
 
 typedef int (*tg_visitor)(struct task_group *, void *);
-- 
2.43.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-12 12:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-12  9:28 [PATCH] sched: change MAX_SHARES to NR_CPUS yaozhenguo
2025-08-12 10:00 ` Peter Zijlstra
2025-08-12 12:04   ` Zhenguo Yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®