Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1541838pxa; Thu, 6 Aug 2020 09:51:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXmCls3RdHXjILz2Olfcw0BgO6heeqcEHRMwPRPgkbu85GvlCeXeKYr+kyLiSOhm0ZT4JF X-Received: by 2002:a17:906:328d:: with SMTP id 13mr5332268ejw.71.1596732717794; Thu, 06 Aug 2020 09:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596732717; cv=none; d=google.com; s=arc-20160816; b=z9VDggAsPk9AWQ7DO6BY1At8mqGfeJI8VRrKo16SfV9ONCtjWfDWPQQGE79RiERG9G o8W+GRwObJ1BVfLPjqjFEtPCm/Np3LZCZWKmV2m1QzPQCEv1UWd7jUgiZBxkNYd8C+dT QELMtrSXBnmgQf9domzBPZFjKA5hna5328f3NuBe5dHvSHOvF4Ys5v6QK7usAgzXhmy+ 62KfAPIFCKNnPox1lIErlhwRkMY30uY8K1ah74w/CtG+lhmCF8p4vNS6dFOd+CjWIEo1 9xLnQCyMcDCsiwIQBJARYFmYf7oTEBo7OuWnkpJOT/CKhuo3iYghuYKoBNrMjJL1ReUv qz+A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=oUtTQvQzuRTitXbmnsvakGMAIns+reCLvH+6yV73zOI=; b=S8rHWG8cQB94jMp/ZBHLrU06n0YpWJPPuNOmyHK5WNhV9ZWbE3or8NXOp7KxxRWxMY eRf4HNwk4pi2oEFQ2O3iQH4KbbGXLZobWfyx79q3+vW4enmwM7vrABBemLf//ZVsmyf9 PmKKkzYwWCmvpkLMdyt+8RnNdkaCnHqCyulrSbojs+BLQuPxU/W76D1OwFXjkTbk2Fsd vRutcPVBF5kqq18tvTCXa0nc2v1/vyrtnsqijNUKmWj4zWR2EWKjTKnxQUGIub+sp1es AfVHYS1/Kmn13K7QvXYXtB2Em4Fh0rSEun2ZvBgHCHTi0ciFCqJM9IhtFdipp5iBy5nL 7eaA== 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 gj23si3837658ejb.482.2020.08.06.09.51.35; Thu, 06 Aug 2020 09:51:57 -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 S1729103AbgHFQtA (ORCPT + 99 others); Thu, 6 Aug 2020 12:49:00 -0400 Received: from foss.arm.com ([217.140.110.172]:45206 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729099AbgHFQmq (ORCPT ); Thu, 6 Aug 2020 12:42:46 -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 3829131B; Thu, 6 Aug 2020 04:25:59 -0700 (PDT) Received: from [192.168.178.2] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 15FF43F99C; Thu, 6 Aug 2020 04:25:51 -0700 (PDT) Subject: Re: [PATCH v4 00/10] sched: Instrument sched domain flags To: Valentin Schneider , linux-kernel@vger.kernel.org Cc: mingo@kernel.org, peterz@infradead.org, vincent.guittot@linaro.org, morten.rasmussen@arm.com, Quentin Perret References: <20200731115502.12954-1-valentin.schneider@arm.com> From: Dietmar Eggemann Message-ID: <306502b9-522a-43d9-1209-15675009bf1b@arm.com> Date: Thu, 6 Aug 2020 13:25:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200731115502.12954-1-valentin.schneider@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/07/2020 13:54, Valentin Schneider wrote: > Hi, > > I've repeatedly stared at an SD flag and asked myself "how should that be > set up in the domain hierarchy anyway?". I figured that if we formalize our > flags zoology a bit, we could also do some runtime assertions on them - > this is what this series is all about. > > Patches > ======= > > The idea is to associate the flags with metaflags that describes how they > should be set in a sched domain hierarchy ("if this SD has it, all its {parents, > children} have it") or how they behave wrt degeneration - details are in the > comments and commit logs. > > The good thing is that the debugging bits go away when CONFIG_SCHED_DEBUG isn't > set. The bad thing is that this replaces SD_* flags definitions with some > unsavoury macros. This is mainly because I wanted to avoid having to duplicate > work between declaring the flags and declaring their metaflags. > > o Patches 1-3 are topology cleanups / fixes > o Patches 4-6 instrument SD flags and add assertions > o Patches 7-10 leverage the instrumentation to factorize domain degeneration > > Revisions > ========= > > v3 -> v4 > -------- > > o Reordered the series to have fixes / cleanups first > > o Added SD_ASYM_CPUCAPACITY propagation (Quentin) > o Made ARM revert back to the default sched topology (Dietmar) > o Removed SD_SERIALIZE degeneration special case (Peter) > > o Made SD_NUMA and SD_SERIALIZE have SDF_NEEDS_GROUPS > > As discussed on v3, I thought this wasn't required, but thinking some more > about it there can be cases where that changes the current behaviour. For > instance, in the following wacky triangle: > > 0\ 30 > | \ > 20 | 2 > | / > 1/ 30 > > there are two unique distances thus two NUMA topology levels, however the > first one for node 2 would have the same span as its child domain and thus > should be degenerated. If we don't give SD_NUMA and SD_SERIALIZE > SDF_NEEDS_GROUPS, this domain wouldn't be denegerated since its child > *doesn't* have either SD_NUMA or SD_SERIALIZE (it's the first NUMA domain), > and we'd have this weird NUMA domain lingering with a single group. LGTM. Tested on Arm & Arm64 dual-cluster big.LITTLE (so only default_topology[]) with CONFIG_SCHED_MC=y for the following cases: (1) normal bring-up (2) CPU hp all but one CPU of one cluster (3) CPU hp entire cluster Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann