From patchwork Wed May 10 13:49:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 92130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3638921vqo; Wed, 10 May 2023 06:50:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yPSz+euJw2hBRKRn2ThYNQOqZDo7UXQswFrgdFQFyg889Zyb85jXcmVEiqzwjV+fJ4xvm X-Received: by 2002:a05:6a21:6318:b0:f0:718f:8eeb with SMTP id wu24-20020a056a21631800b000f0718f8eebmr18762251pzb.60.1683726650992; Wed, 10 May 2023 06:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683726650; cv=none; d=google.com; s=arc-20160816; b=pN0UHXvlsTsdGRcg7UVUqMIm4asQyldM/lkAgqCEuZJNG4bfynDGWo+hvwwc0hFmxj GizaBNeFmnRG+DKFgae/gS8UjE9VsxYTXtu2mgt+Gf9j64EWSWMSzoi//JOMf99kZ86s r/kN5WSule6FtYPrqGcqOEwxF5JHGskjdiRglMA5RqIALvMhQxna7nAINcYMNUs/CLZm LtrRs79onC1fEVLa/FeUE8Y5qVDdcMYHXewE5RF3vMd/tCKp70t/9iniu06Dj5mg90lK SAK0Q6oWzIuv06HUVR7RdJ0gXzMpRZTIiCC3ZU+a+5CQkebrKKjNJrdhyTOfY1SwdYlT i4QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=uaBMDeAOqEtMsjfmbiAxy4lKR2OqnajE5Ae9sex7JRk=; b=IyeRTBs44zZbM0vJrB2fj6kfn2yxZ+OiekLU5BDfAn5HzsK8XLigWOcaPunqYWAylb 0dGntbbILS1OGfPiipsv7omxZrJ16NhuoPawsUaFCzbrzEOLtBzz84ZWQh6IYopMQKDZ 5Uu02Vr4U8GPvsYo9QrVsbPq6j6baUa6L3882nNVBRKV1Aberv3B1KsPlzJHj+/hFebv YdFzngM0Tkh+xHTN2VyAo6ip84yoITu29vLUQQu/qqmS8KxIubRVsHvoJ1hjGgCO5X5n 0ShmmQpSUNvsDDqgF/5+Gd96pprr0EuRV8N62vO8zj0rJLUBpPInk3RcHF21ghLKFCho xsuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NRoFR3Yj; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z67-20020a633346000000b0050e7254402esi4064416pgz.208.2023.05.10.06.50.37; Wed, 10 May 2023 06:50:50 -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=@linutronix.de header.s=2020 header.b=NRoFR3Yj; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237280AbjEJNt1 (ORCPT + 99 others); Wed, 10 May 2023 09:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237262AbjEJNtS (ORCPT ); Wed, 10 May 2023 09:49:18 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 124A426A3; Wed, 10 May 2023 06:49:11 -0700 (PDT) Date: Wed, 10 May 2023 13:49:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683726549; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uaBMDeAOqEtMsjfmbiAxy4lKR2OqnajE5Ae9sex7JRk=; b=NRoFR3Yjj9esQtEabWcLvhUJZHrKbO9YmVM/diNCpLTYRJElj0/0Gk7B90WPQADIrhBKEY ZgpjlycgKVnQTDjqG5K+OguquoDdFRXMWj6dfqxItgdfIweYnujfwDlhWvKebAHjoStBbP QM+udsBTg9pWG1KlmHmwdO6Cc4RGRdKNJXaWHlhVFZW39BO2r6ziD3zwpso9BwVTE/Z0V1 cnJbk3k6JZ/CJUXVLbspGa/jdWschofy0K6q/fm0Xkr0bpE8k5zz6eHywu84FM24Pq6U57 fC2jB88t7Fc2R63ysnIziEI7RjAvUc2XC5VyOVZJPftNJ1O9KJoKBiXfQvFGlQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683726549; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uaBMDeAOqEtMsjfmbiAxy4lKR2OqnajE5Ae9sex7JRk=; b=WG5b8F82wbUxxfC4aAd8Rhw3yQH2ruZDxOyjyPmCQaulULYMVFpIC2RPtj8UTYoBr+2TQ+ u6WfsURrhmR1ElCg== From: "tip-bot2 for Tim C Chen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/topology: Propagate SMT flags when removing degenerate domain Cc: Tim Chen , "Peter Zijlstra (Intel)" , Ricardo Neri , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: =?utf-8?q?=3C73cf0959eafa53c02e7ef6bf805d751d9190e55d=2E1683156?= =?utf-8?q?492=2Egit=2Etim=2Ec=2Echen=40linux=2Eintel=2Ecom=3E?= References: =?utf-8?q?=3C73cf0959eafa53c02e7ef6bf805d751d9190e55d=2E16831564?= =?utf-8?q?92=2Egit=2Etim=2Ec=2Echen=40linux=2Eintel=2Ecom=3E?= MIME-Version: 1.0 Message-ID: <168372654916.404.6677242284447941021.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764982188058817486?= X-GMAIL-MSGID: =?utf-8?q?1765515356676249863?= The following commit has been merged into the sched/core branch of tip: Commit-ID: bf2dc42d6beb890c995b8b09f881ef1b37259107 Gitweb: https://git.kernel.org/tip/bf2dc42d6beb890c995b8b09f881ef1b37259107 Author: Tim C Chen AuthorDate: Thu, 04 May 2023 09:09:51 -07:00 Committer: Peter Zijlstra CommitterDate: Mon, 08 May 2023 10:58:39 +02:00 sched/topology: Propagate SMT flags when removing degenerate domain When a degenerate cluster domain for core with SMT CPUs is removed, the SD_SHARE_CPUCAPACITY flag in the local child sched group was not propagated to the new parent. We need this flag to properly determine whether the local sched group is SMT. Set the flag in the local child sched group of the new parent sched domain. Signed-off-by: Tim Chen Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ricardo Neri Link: https://lkml.kernel.org/r/73cf0959eafa53c02e7ef6bf805d751d9190e55d.1683156492.git.tim.c.chen@linux.intel.com --- kernel/sched/topology.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 6682535..ca44722 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -719,8 +719,13 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) if (sd_parent_degenerate(tmp, parent)) { tmp->parent = parent->parent; - if (parent->parent) + + if (parent->parent) { parent->parent->child = tmp; + if (tmp->flags & SD_SHARE_CPUCAPACITY) + parent->parent->groups->flags |= SD_SHARE_CPUCAPACITY; + } + /* * Transfer SD_PREFER_SIBLING down in case of a * degenerate parent; the spans match for this