Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp430687pxa; Wed, 12 Aug 2020 05:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXe2tkfNVtDBlPuzkdOssJ+96d+DY6F9LWBAlVBx+hGVBg2FJDPfbDDle1oXKl31cfDIw7 X-Received: by 2002:a17:906:f1da:: with SMTP id gx26mr31639138ejb.129.1597236924380; Wed, 12 Aug 2020 05:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597236924; cv=none; d=google.com; s=arc-20160816; b=paUvpDfdz4mpdaGLQ+JN+8SwqwrTgjpG9qehSXVhpGQmTSZslUv0nyE8NT9C/k8jHy 6dZJd0TdPmayaznHtXYv3QAcM73gVhLhPEGZ+FDpdbbAayqTbkXyenlYlplEqkqvWPcq QK9zF+7z+B1cJHbweNMKYvrFL1gqfiZoRsDGKIdonjdjLN+5fiqI8tA+AXQHBQkKeks1 xTN5AgZ94I+2tcvbbzjtEdgdY0qaiiltJZKnebpg4pLGC7kMw8KyzU3cPZe/sLQDpUq4 7BvWuZ04c7+NM8WZBScLGJqirt+Er9766Jk0izGQ01tYDCqgJrfEHSfxnXc7My78GHu8 sgAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OjuHdtXaCGGSRSnUg0JWt6oKrw7vElSvqMfVSoe4cq0=; b=QqB2c0qdBbRertOaYZCEo4hGncZv9OFRh47SHFUQ3+bf8GSwp0YsKbuwp36jo3QssR 8qeKk7cLKemvmidTTrexRzEoQ4w7EshyHUDHdy2DvjDqe4Ub+LQ7k5SqqxhSJOX5P1wc MAHVdy9MnlJEOSpDkeiJDLDmDRvX5uU5aIEQ3BFTAWGASnR5MAFaNlpXfYQ0DE45EM81 VmKU6zK/DoJax+ylpKGxOmfE2hukSZEryFQ4R8khKHndehQdoMVgKlZuXEnpQZQSG8nC MsWDCJ70p3q7whXEKOpu4gr7+py/oB5p2sQ3nDMjITSZz5CA/tt+G7JfBifB8bzH2rcm uVUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si1114087ejb.224.2020.08.12.05.55.00; Wed, 12 Aug 2020 05:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728034AbgHLMxg (ORCPT + 99 others); Wed, 12 Aug 2020 08:53:36 -0400 Received: from foss.arm.com ([217.140.110.172]:44656 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728058AbgHLMx3 (ORCPT ); Wed, 12 Aug 2020 08:53:29 -0400 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 CF1021045; Wed, 12 Aug 2020 05:53:28 -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 922D33F70D; Wed, 12 Aug 2020 05:53:27 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: mingo@kernel.org, peterz@infradead.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, Quentin Perret Subject: [PATCH v5 11/17] sched/topology: Mark SD_PREFER_SIBLING as SDF_NEEDS_GROUPS Date: Wed, 12 Aug 2020 13:52:54 +0100 Message-Id: <20200812125300.11889-12-valentin.schneider@arm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200812125300.11889-1-valentin.schneider@arm.com> References: <20200812125300.11889-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SD_PREFER_SIBLING is currently considered in sd_parent_degenerate() but not in sd_degenerate(). It too hinges on load balancing, and thus won't have any effect when set on a domain with a single group. Add it to SD_DEGENERATE_GROUPS_MASK. Signed-off-by: Valentin Schneider --- include/linux/sched/sd_flags.h | 4 +++- kernel/sched/topology.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/sched/sd_flags.h b/include/linux/sched/sd_flags.h index 4f07b405564e..75c9749a6e2d 100644 --- a/include/linux/sched/sd_flags.h +++ b/include/linux/sched/sd_flags.h @@ -131,8 +131,10 @@ SD_FLAG(SD_ASYM_PACKING, SDF_SHARED_CHILD) * * Set up until domains start spanning NUMA nodes. Close to being a SHARED_CHILD * flag, but cleared below domains with SD_ASYM_CPUCAPACITY. + * + * NEEDS_GROUPS: Load balancing flag. */ -SD_FLAG(SD_PREFER_SIBLING, 0) +SD_FLAG(SD_PREFER_SIBLING, SDF_NEEDS_GROUPS) /* * sched_groups of this level overlap diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 02fd8db747b2..8064f495641b 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -184,7 +184,7 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent) /* Flags needing groups don't count if only 1 group in parent */ if (parent->groups == parent->groups->next) - pflags &= ~(SD_DEGENERATE_GROUPS_MASK | SD_PREFER_SIBLING); + pflags &= ~SD_DEGENERATE_GROUPS_MASK; if (~cflags & pflags) return 0; -- 2.27.0