Message ID | e64678a22c57d572dcac20a0d492d406d56bf881.1688770494.git.tim.c.chen@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3588938vqx; Fri, 7 Jul 2023 16:04:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlGxYbTivZa6lKDg5nPuohlGBiHjWO0jLZQJlf8Q+8oR7tNPW0Kd6ALBFhbFK7OBlrQo06/S X-Received: by 2002:a17:906:1da:b0:982:9b01:a582 with SMTP id 26-20020a17090601da00b009829b01a582mr4980298ejj.1.1688771058207; Fri, 07 Jul 2023 16:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688771058; cv=none; d=google.com; s=arc-20160816; b=jQF5A6YGRJxibSe1MzhdUPUcPhdbZYeKoyTDhlIspeQMHJV4t/um3Ydn4BG4F1y/aP dSrLjhzNtnMYkBfOCC6ackP3VLL23ciTDCXantDDrQaVfKog3JpxqTN0x/LkcBYgLFDx dtEsSIXzEiKIIZqmTboX+8m0y5bNvmQASEWLbrnvz8JvBV7Aw6tKEjGudDLL1Ic1kVMg FiKBl9RS4FbENMW2qDwf+BWR37L3Wtwrn13foSZecKhrOCAVbBRjG+Hap2qAQpCf0Xwj o+zc0qk1K0kyJSlTcMP0SoDt620fPq9qiacaFxhESZDTCI9EFIylrxFuH1I5Ht9Z6ypu Df5w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eFVXp5F5KelOJncVqAuOWwNcxKZOi+9qRxvNzloKO9U=; fh=BqL4qgzcgaT+e2QhRWTpoXN4GW9312oJc43sl0M1Xnw=; b=GVhcv3vKzaWcBNDIdZiKojEt70VOCQcNiqfFa90dFvaZn+eVU50q1/60DwfBg1KOPS zjyZfO/5uDQ/+AFOTNUTQu+5UJnHuG/Tn6ynwRi8mUgYoNXv6oXRdkmqZ5YUSqYRoDTR AF4mWDDMGHvYzozQ5Ga5rpzDZOOsvSxZ+tlAdJjjUle1PSLbhWwpcG5IQuuyRZMGMwev uhi2lqmcNHXtL3y5fUp3Uyjvu9PFiy8AXUA1oP2jIPuA/OYO4Ug8YnZtbi4o6BNxkB7v ZlDW7Njk2XwoArr4bhp8uIe7ySVrWQI6fkq+H/lEA64bAwBKsI5LJ9L6jppcvyk084g5 8FSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OBYCgSmV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a170906c31200b00992b3c5c752si2578229ejz.1047.2023.07.07.16.03.54; Fri, 07 Jul 2023 16:04:18 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=OBYCgSmV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232604AbjGGW5O (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Fri, 7 Jul 2023 18:57:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231799AbjGGW46 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 7 Jul 2023 18:56:58 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0F011992 for <linux-kernel@vger.kernel.org>; Fri, 7 Jul 2023 15:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688770617; x=1720306617; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=40RBK7UEzMfh6s+/yIJhkN9+deAVJi5T19wOPusP9aM=; b=OBYCgSmV8jNink+T4OFXEL4Qi4vKbSwNyZuOHGmpKgNohAztcWOzkbLJ QSyeQPjeLDh4+2RoTMd3/skmo9e2Oq1KRck+8pWfLu9qriFwh/X6GDkap l7Z9Iwap6xc5HvSgbOtCGWmD7vNoL7v0LARkkLM3hG21mFj8g6Jnk1U+3 i4/dKeHs28Cuan0Gog0tEBf6FhPQ70KyGQ6JoYY040imVIClEFwqGlgft QUrTW9zZN+cyjrOm8q7moeL6Iq2i8kVJEZ9++Nxn3jdb8ZnQBYR7qVPwQ IS5bhvtbMrEDRTozvaYMswpLBw6JtF0/BILB2mjZBZ03vvRB5etr8QITE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10764"; a="427683505" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="427683505" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2023 15:56:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10764"; a="714176681" X-IronPort-AV: E=Sophos;i="6.01,189,1684825200"; d="scan'208";a="714176681" Received: from b04f130c83f2.jf.intel.com ([10.165.154.98]) by orsmga007.jf.intel.com with ESMTP; 07 Jul 2023 15:56:57 -0700 From: Tim Chen <tim.c.chen@linux.intel.com> To: Peter Zijlstra <peterz@infradead.org> Cc: Tim C Chen <tim.c.chen@linux.intel.com>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Ricardo Neri <ricardo.neri@intel.com>, "Ravi V . Shankar" <ravi.v.shankar@intel.com>, Ben Segall <bsegall@google.com>, Daniel Bristot de Oliveira <bristot@redhat.com>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Len Brown <len.brown@intel.com>, Mel Gorman <mgorman@suse.de>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, Steven Rostedt <rostedt@goodmis.org>, Valentin Schneider <vschneid@redhat.com>, Ionela Voinescu <ionela.voinescu@arm.com>, x86@kernel.org, linux-kernel@vger.kernel.org, Shrikanth Hegde <sshegde@linux.vnet.ibm.com>, Srikar Dronamraju <srikar@linux.vnet.ibm.com>, naveen.n.rao@linux.vnet.ibm.com, Yicong Yang <yangyicong@hisilicon.com>, Barry Song <v-songbaohua@oppo.com>, Chen Yu <yu.c.chen@intel.com>, Hillf Danton <hdanton@sina.com>, Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Subject: [Patch v3 5/6] sched/x86: Add cluster topology to hybrid CPU Date: Fri, 7 Jul 2023 15:57:04 -0700 Message-Id: <e64678a22c57d572dcac20a0d492d406d56bf881.1688770494.git.tim.c.chen@linux.intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <cover.1688770494.git.tim.c.chen@linux.intel.com> References: <cover.1688770494.git.tim.c.chen@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770804801259522576?= X-GMAIL-MSGID: =?utf-8?q?1770804801259522576?= |
Series |
Enable Cluster Scheduling for x86 Hybrid CPUs
|
|
Commit Message
Tim Chen
July 7, 2023, 10:57 p.m. UTC
From: Tim C Chen <tim.c.chen@linux.intel.com> Cluster topology was not enabled on hybrid x86 CPU as load balance was not properly working for cluster domain. That has been fixed and cluster domain can be enabled for hybrid CPU. Reviewed-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> --- arch/x86/kernel/smpboot.c | 3 +++ 1 file changed, 3 insertions(+)
Comments
On Fri, Jul 07, 2023 at 03:57:04PM -0700, Tim Chen wrote: > From: Tim C Chen <tim.c.chen@linux.intel.com> > > Cluster topology was not enabled on hybrid x86 CPU as load balance > was not properly working for cluster domain. That has been fixed and > cluster domain can be enabled for hybrid CPU. > > Reviewed-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> > Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> Yeah, you didn't actually try appling this to something recent did ya :-) You missed 8f2d6c41e5a6 ("x86/sched: Rewrite topology setup"). I'll replace this patch with the below. --- arch/x86/kernel/smpboot.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index ed2d51960a7d..3b751d79cdfb 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -632,14 +632,9 @@ static void __init build_sched_topology(void) }; #endif #ifdef CONFIG_SCHED_CLUSTER - /* - * For now, skip the cluster domain on Hybrid. - */ - if (!cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) { - x86_topology[i++] = (struct sched_domain_topology_level){ - cpu_clustergroup_mask, x86_cluster_flags, SD_INIT_NAME(CLS) - }; - } + x86_topology[i++] = (struct sched_domain_topology_level){ + cpu_clustergroup_mask, x86_cluster_flags, SD_INIT_NAME(CLS) + }; #endif #ifdef CONFIG_SCHED_MC x86_topology[i++] = (struct sched_domain_topology_level){
On Sat, 2023-07-08 at 14:31 +0200, Peter Zijlstra wrote: > On Fri, Jul 07, 2023 at 03:57:04PM -0700, Tim Chen wrote: > > From: Tim C Chen <tim.c.chen@linux.intel.com> > > > > Cluster topology was not enabled on hybrid x86 CPU as load balance > > was not properly working for cluster domain. That has been fixed and > > cluster domain can be enabled for hybrid CPU. > > > > Reviewed-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> > > Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> > > Yeah, you didn't actually try appling this to something recent did ya > :-) > > You missed 8f2d6c41e5a6 ("x86/sched: Rewrite topology setup"). > > I'll replace this patch with the below. Thanks for catching it. Tim > > --- > arch/x86/kernel/smpboot.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c > index ed2d51960a7d..3b751d79cdfb 100644 > --- a/arch/x86/kernel/smpboot.c > +++ b/arch/x86/kernel/smpboot.c > @@ -632,14 +632,9 @@ static void __init build_sched_topology(void) > }; > #endif > #ifdef CONFIG_SCHED_CLUSTER > - /* > - * For now, skip the cluster domain on Hybrid. > - */ > - if (!cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) { > - x86_topology[i++] = (struct sched_domain_topology_level){ > - cpu_clustergroup_mask, x86_cluster_flags, SD_INIT_NAME(CLS) > - }; > - } > + x86_topology[i++] = (struct sched_domain_topology_level){ > + cpu_clustergroup_mask, x86_cluster_flags, SD_INIT_NAME(CLS) > + }; > #endif > #ifdef CONFIG_SCHED_MC > x86_topology[i++] = (struct sched_domain_topology_level){
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index cea297d97034..2489d767c398 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -575,6 +575,9 @@ static struct sched_domain_topology_level x86_hybrid_topology[] = { #ifdef CONFIG_SCHED_SMT { cpu_smt_mask, x86_smt_flags, SD_INIT_NAME(SMT) }, #endif +#ifdef CONFIG_SCHED_CLUSTER + { cpu_clustergroup_mask, x86_cluster_flags, SD_INIT_NAME(CLS) }, +#endif #ifdef CONFIG_SCHED_MC { cpu_coregroup_mask, x86_core_flags, SD_INIT_NAME(MC) }, #endif