Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp125878rdb; Thu, 24 Aug 2023 00:41:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESJ7Ji3/TZUxpuha34ioumvwPZ6NANZFGwGBYuX69bmfbPq4bad6VVgSPtk4QK8lpi1+pX X-Received: by 2002:a05:6808:2b04:b0:3a6:fba6:d900 with SMTP id fe4-20020a0568082b0400b003a6fba6d900mr15048297oib.22.1692862902850; Thu, 24 Aug 2023 00:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692862902; cv=none; d=google.com; s=arc-20160816; b=GbgCzDAX2Cswkjg6Hv9AEBUjp0DC+Z1eBIESoNKzO6Ig8ClgwYnjfkFJGC3T5JLDLO KmmAdjjI43KGlgafrfIVfcRWlsJl2Wvbqq1qSb4fkMfssva+geZG6sDsT31znMThNEqh w+55BZ8o0ZY7zkwCPhDs02sISXwEW19EiC6ZanW4jCuEvGqNRRhpMn7Eb6VZXKviF1kP h5WIUUNac/Kw8t+o/9QBcevjiPyfKR4XpmD8Fokg2p+RejCBbiTs6fcYVRzeZt1/C3NB kuHCNWSOXO0ce6aEawyqkxRYpr+8F45xOk5fWNoPWNAhN90y45JrsPUwDLY5VBQ6gPdY JVKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ckyVy4oP53XQ2nERU1uWeBi9HsotNxZ6p9BiPEwzIRo=; fh=i9eAtXN0zUCp+mygA5/snjAPvr/z5H0hD0qVJ03+0DQ=; b=OM9bJJQNX5lY2gzvoIf6wKxhMAWM0n2hHGRtCLdDpy0WCWuZ/j49BFLDyjRgpTEG8S nyGayMfDaPiF8WCApbePK3Ihj+yJof8zpgVI/x3b5nanZSLCoU9QmGqvucXJrxEZ3vZE NWW+UTWG74i7rBJ/XnQIpyynMTSaY+Mhul6jzRZJyABzhYRbG2oQ+ZENJjSE0cocy2ry HVDcAGNs+BS7M1Ui/WJfTp2J8Woa6J9MF8Se2VKQ5r2gBv019B9qgLkZIOEcjH036dXo 3ibtxqBGGe5kcqfeLr9by0sl+thPbdhOtbI8CQnMOH894K8dU47PHADpavcjDp30Jqsi 3SZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y41-20020a056a001ca900b00682399fa4f9si8289617pfw.300.2023.08.24.00.41.30; Thu, 24 Aug 2023 00:41:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238908AbjHXEjZ (ORCPT + 99 others); Thu, 24 Aug 2023 00:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238980AbjHXEiu (ORCPT ); Thu, 24 Aug 2023 00:38:50 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4BA810E4 for ; Wed, 23 Aug 2023 21:38:47 -0700 (PDT) Received: from kwepemm600010.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RWVfy1kvRzrSK3; Thu, 24 Aug 2023 12:37:14 +0800 (CST) Received: from huawei.com (10.175.101.6) by kwepemm600010.china.huawei.com (7.193.23.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 24 Aug 2023 12:38:44 +0800 From: Liu Chao To: CC: , , , , , , Subject: [PATCH] sched: Increase MAX_SHARES Date: Thu, 24 Aug 2023 05:37:53 +0100 Message-ID: <20230824043753.2049500-1-liuchao173@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600010.china.huawei.com (7.193.23.86) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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