Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp756138rwp; Wed, 12 Jul 2023 23:53:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHnwb35uZiFonlyOz0MalWLT82+vQiYbtHDiqC3LhdHyvvQE0HoGlnlkpByLl+ovcVu7P9y X-Received: by 2002:a05:6808:170e:b0:3a4:11df:bb63 with SMTP id bc14-20020a056808170e00b003a411dfbb63mr840985oib.3.1689231235153; Wed, 12 Jul 2023 23:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689231235; cv=none; d=google.com; s=arc-20160816; b=Om0Ges9e8zP8/ySFcDZ0eFPx0Ki8nTo89z3d0T0UICeK89OClXp2bjPdqGAEwRECKV vuxGaMrkfIpgV+KN6v6nGJSMqZ/QnurbOqokH9kHsFNN4pSk9Wd6z0S5yTn3HJO8zMZM 299GdU3odJtQc5C5MtbAzH7Chg2mDBXbcPfzhpCat1HfL76o0Qw4IkLatKdHCdAnXwvM 3DV7xjw1r57CDS6KpoyVSwmd5byIG3VTJ4XTq2OX3l4aXVJtFAC98JaNBBL15tz6idud 5uglb3twStGypCP0vQu2NklTQcakoPrPyK2lvkETghq2DJ/JQi4dBkneNoZzUW/BuFTz 2Lbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :cc; bh=a7a++TrhfKBtYxJUM+dEyIg5y37ZwjrDK3Snc1Kn60E=; fh=a1kji8tGh8nqE//kdWL+2U26UP7ZEIiDOB1un9WI2Ug=; b=sCLSNaYpLjbO2h97jGBdm8ibZsbbk4yHBOqlDR7DAtkOdMkYTRghV5Ru3LQ9Qk9PKB dY2V87jPpVDO85ekuMHsEvUfKccsrnScJ683UVLCM7hetxlbVrDqop3H2K+178GjXGTj AxnR8RPbGn423HfCjhYTExCVTWtHxk9iaeNYFQCm2mOOpVLpviIsQ1s6tdI3qL/EBbIk HhyC3GblEGUAmRjMKvoKEX3i27zz+OoA8yUVBcnc8nqNLnIa+/1oYlf8kKgx5HUMFRj/ rqM/11rQFFpSgujFawu98xPQ9T+mHMM1dfmQI6T+oTMEALr6bVHMj1nZHd3QnU8KkgBF outg== 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 h193-20020a636cca000000b005534371608dsi4609683pgc.849.2023.07.12.23.53.42; Wed, 12 Jul 2023 23:53:55 -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 S234054AbjGMGfZ (ORCPT + 99 others); Thu, 13 Jul 2023 02:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233452AbjGMGfY (ORCPT ); Thu, 13 Jul 2023 02:35:24 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA3B21BEB for ; Wed, 12 Jul 2023 23:35:20 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R1lFs6sB4zrRlj; Thu, 13 Jul 2023 14:34:41 +0800 (CST) Received: from [10.67.102.169] (10.67.102.169) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 13 Jul 2023 14:35:18 +0800 CC: , Ricardo Neri , Tim Chen , Subject: Re: [PATCH] sched/topology: Align group flags when removing degenerate domain To: Chen Yu , Peter Zijlstra , Juri Lelli , Vincent Guittot , Ingo Molnar References: <20230713013133.2314153-1-yu.c.chen@intel.com> From: Yicong Yang Message-ID: <9a9cdf48-816f-56aa-6e0f-1d89d5c5cbd2@huawei.com> Date: Thu, 13 Jul 2023 14:35:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20230713013133.2314153-1-yu.c.chen@intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.169] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 2023/7/13 9:31, Chen Yu wrote: > The flags of the child of a given scheduling domain are used to initialize > the flags of its scheduling groups. When the child of a scheduling domain > is degenerated, the flags of its local scheduling group need to be updated > to align with the flags of its new child domain. > > The flag SD_SHARE_CPUCAPACITY was aligned in > Commit bf2dc42d6beb ("sched/topology: Propagate SMT flags when removing degenerate domain"). > Further generalize this alignment so other flags can be used later, such as > in cluster-based task wakeup. [1] Currently I only update the cluster flags on my current testing branch. It'll be even better to align all flags for possible usage. Will rebase on this one. > > Link: https://lore.kernel.org/lkml/20230530115527.GC156198@hirez.programming.kicks-ass.net #1 > Suggested-by: Ricardo Neri > Reported-by: Yicong Yang > Closes: https://lore.kernel.org/lkml/ce714341-af58-2522-69a8-321f02c82893@huawei.com/ > Signed-off-by: Chen Yu Reviewed-by: Yicong Yang > --- > kernel/sched/topology.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > index d3a3b2646ec4..ff02d7deec0c 100644 > --- a/kernel/sched/topology.c > +++ b/kernel/sched/topology.c > @@ -722,8 +722,7 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) > > if (parent->parent) { > parent->parent->child = tmp; > - if (tmp->flags & SD_SHARE_CPUCAPACITY) > - parent->parent->groups->flags |= SD_SHARE_CPUCAPACITY; > + parent->parent->groups->flags = tmp->flags; > } > > /* >