Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp973185pxp; Wed, 16 Mar 2022 23:07:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1ONzsbacRPLBBU8kpWD6Re4g4a97ae39kgz0jXH6pGarmL+6aCWd02BBR4b7YrUoQ9Nyb X-Received: by 2002:a63:224a:0:b0:368:e837:3262 with SMTP id t10-20020a63224a000000b00368e8373262mr2457496pgm.546.1647497226234; Wed, 16 Mar 2022 23:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647497226; cv=none; d=google.com; s=arc-20160816; b=sGtMh+BG+87DJOnKSAP1UfLA3uHUUYK2rADLHB2U/yGpNY5DnWEs4eXb8bLjqX/Yhm UClMhZnkAzI9qeCFuZbPX65A7pdyIcJa0XgFFO9HbXAEnEYmD4yDwJ8dimiZE1tbvmXS ZED0NXpFAgg+EhiT+cjHsAaTCgJx89WDdoKlF7TriV2A4+UUDz+TXODBEgbGcYL7+7P+ 1cgEhen4Qt1+Q2hintyei4IP7O95GP5SpGqjViUWpJ/nHtvaGTifKA50JmXA1lKLWA/N sQVGz0VGDIZfO69zkdC5dZEbxl+h2YjUR81uIddyijvTLvqjqoco7Gt3hjqNWpwpw92y w+2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=zIW1sgG1k8aEfFVhGFczXPBpLYSQ4a8N435tsn5Zig8=; b=UZlEXqL9fhrge9GTV7Jk4fI/N9oYTgKkqOdvrdXnalmblet5Au0epCfUNpx//CAZ4Y xTVZlagezCpr0YkHJp+3jHTUZnhsQy4vcGPMRPjRPY7k3BIHoOZ6S4ErrPPQwrxtFjVi AlB5xSp4Rg0sZHL2Z1r8SH3bnxZlLDjo1atG2PCcaiwCON+l4cjTzeuTeYnUZtkOv7X4 m359tuBYYMt9kpkU3RgyRE7bs1WSkwb4FugTTzAfnQJdWV1ccIG2NA9AJCwFqX+wJ2VH LcWw2aO0A5cZ4XHXV+kbKyF3tJKqcgpwlP6KfcFqWGAWhwjq+/MHgoPFGqkq9vI4s9ur 7zEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a6-20020a170902900600b00151ee912758si3554400plp.225.2022.03.16.23.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:07:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0EDB5292B98; Wed, 16 Mar 2022 22:14:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356773AbiCPOuR (ORCPT + 99 others); Wed, 16 Mar 2022 10:50:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245291AbiCPOuQ (ORCPT ); Wed, 16 Mar 2022 10:50:16 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3537344E3; Wed, 16 Mar 2022 07:49:01 -0700 (PDT) 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 708A71476; Wed, 16 Mar 2022 07:49:01 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A55DF3F766; Wed, 16 Mar 2022 07:48:58 -0700 (PDT) Message-ID: Date: Wed, 16 Mar 2022 15:48:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3] topology: make core_mask include at least cluster_siblings Content-Language: en-US To: Darren Hart Cc: Vincent Guittot , Will Deacon , LKML , Linux Arm , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , Catalin Marinas , Peter Zijlstra , Valentin Schneider , "D . Scott Phillips" , Ilkka Koskinen , stable@vger.kernel.org, Barry Song <21cnbao@gmail.com> References: <20220308103012.GA31267@willie-the-truck> <7ac47c67-0b5e-5caa-20bb-a0100a0cb78f@arm.com> <9398d7ad-30e7-890a-3e18-c3011c383585@arm.com> From: Dietmar Eggemann In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 - Barry Song (always get undelivered mail returned to sender) + Barry Song <21cnbao@gmail.com> On 14/03/2022 17:54, Darren Hart wrote: > On Mon, Mar 14, 2022 at 05:35:05PM +0100, Dietmar Eggemann wrote: >> On 09/03/2022 19:26, Darren Hart wrote: >>> On Wed, Mar 09, 2022 at 01:50:07PM +0100, Dietmar Eggemann wrote: >>>> On 08/03/2022 18:49, Darren Hart wrote: >>>>> On Tue, Mar 08, 2022 at 05:03:07PM +0100, Dietmar Eggemann wrote: >>>>>> On 08/03/2022 12:04, Vincent Guittot wrote: >>>>>>> On Tue, 8 Mar 2022 at 11:30, Will Deacon wrote: [...] > Ultimately, this delivers the same result. I do think it imposes more complexity > for everyone to address what as far as I'm aware only affect the one system. > > I don't think the term "Cluster" has a clear and universally understood > definition, so I don't think it's a given that "CLS should be sub-SD of MC". I I agree, the term 'cluster' is overloaded but default_topology[] clearly says (with direction up means smaller SD spans). #ifdef CONFIG_SCHED_CLUSTER { cpu_clustergroup_mask, cpu_cluster_flags, SD_INIT_NAME(CLS) }, #endif #ifdef CONFIG_SCHED_MC { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) }, #endif In ACPI code we have `cluster_node = fetch_pptt_node(... , cpu_node->parent) but then the cache information (via llc_id/llc_sibling) can change things which make this less easy to grasp. > think this has been assumed, and that assumption has mostly held up, but this is > an abstraction, and the abstraction should follow the physical topologies rather > than the other way around in my opinion. If that's the primary motivation for > this approach, I don't think it justifies the additional complexity. > > All told, I prefer the 2 line change contained within cpu_coregroup_mask() which > handles the one known exception with minimal impact. It's easy enough to come > back to this to address more cases with a more complex solution if needed in the > future - but I prefer to introduce the least amount of complexity as possible to > address the known issues, especially if the end result is the same and the cost > is paid by the affected systems. > > Thanks, Yeah, I can see your point. It's the smaller hack. My solution just prevents us to manipulate the coregroup mask only to get the MC layer degenerated by the core topology code. But people might say that's a clever thing to do here. So I'm fine with your original solution as well. [...]