From patchwork Mon Aug 17 11:30:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 11718073 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 329AC1392 for ; Mon, 17 Aug 2020 11:34:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03404204EC for ; Mon, 17 Aug 2020 11:34:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2XPGNOf2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03404204EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=N/xPsXsw87HnsSBbv+jH88z+ANDvgC7o0PVqHbKG7bg=; b=2XPGNOf2f996Ipi2T9uRcXqw5 LcXGJwX9KP4EdgB0dA9G/88w2c/pIdU5XilR+ZSmIhphhZLHV51A8/jkOlTLB6rykvH5QTtLEUPJI ls0vZkevs7lyPqsB6eao9hGegjkEZJ3+pXD7nkrd7t/duF/gbSbyo3BSYlf7rO5rPcVwvHx/9hf1O QaabRz0v8Q+fAAW7uuI3usDPay5YD+sFu3DhENJCplEebYfRDJJgl0GAbxt7T3PsPMHiLv417bgiK 0OrjvxRF7uYDQGwf1olGMnH/qoXd5MeQFBNmr7bydjxi0apgKqm204hxEsVVIrOe5TWMI66JWR3aI EIUJztk9A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7dNq-0001bI-0t; Mon, 17 Aug 2020 11:32:58 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7dLa-0000DP-BQ for linux-arm-kernel@lists.infradead.org; Mon, 17 Aug 2020 11:30:40 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2AF8D13D5; Mon, 17 Aug 2020 04:30:38 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DEE213F66B; Mon, 17 Aug 2020 04:30:36 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 17/17] sched/topology: Expand use of SD_DEGENERATE_GROUPS_MASK to flags not needing groups Date: Mon, 17 Aug 2020 12:30:03 +0100 Message-Id: <20200817113003.20802-18-valentin.schneider@arm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200817113003.20802-1-valentin.schneider@arm.com> References: <20200817113003.20802-1-valentin.schneider@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_073039_296565_8AF185D7 X-CRM114-Status: GOOD ( 14.67 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vincent.guittot@linaro.org, Quentin Perret , peterz@infradead.org, morten.rasmussen@arm.com, mingo@kernel.org, dietmar.eggemann@arm.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org All SD flags requiring 2+ sched_group to have any effect are now decorated with the SDF_NEEDS_GROUPS metaflag. This means we can now use the bitwise negation of SD_DEGENERATE_MASK in sd_degenerate() instead of explicitly using SD_WAKE_AFFINE (IOW the only flag without SDF_NEEDS_GROUPS). From now on, any flag without SDF_NEEDS_GROUPS will be correctly accounted as a flag not requiring 2+ sched_groups. Signed-off-by: Valentin Schneider --- kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 8064f495641b..3bb145ef5abd 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -165,7 +165,7 @@ static int sd_degenerate(struct sched_domain *sd) return 0; /* Following flags don't use groups */ - if (sd->flags & (SD_WAKE_AFFINE)) + if (sd->flags & ~SD_DEGENERATE_GROUPS_MASK) return 0; return 1;