Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp899505pxp; Wed, 16 Mar 2022 20:36:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnxdNpZo/F1E0KR4pqLj/pMaYrLUVcLZWgl+uZ7CnE4G/POtjUQ9luIQr9ZYxgCeYDVEHC X-Received: by 2002:a17:90b:4b0d:b0:1bc:4cdb:ebe3 with SMTP id lx13-20020a17090b4b0d00b001bc4cdbebe3mr3062177pjb.176.1647488204911; Wed, 16 Mar 2022 20:36:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1647488204; cv=pass; d=google.com; s=arc-20160816; b=xBwFXgMuOc8LBI2p7FHucx7XDR8J4A0yA/nP3tJDemDkN72grbDTrsIWS+Eb+1hSb3 QtkLEb6tzK40Tcxd3n6Yi2taY083OVMYYvhOuchWI74UzlumyiwIi7J+S6+PmcQ4Rcsy 0nv8QnzARGbo+8cnPy5k8sxVEdBYF59n/jhhuT9H4qB9tVvBsk+/ciawFzW+IVmCk7hp eLCjQT9XrFED2+dB8o/W6bIgAQzK4IE5C/8CxUOfnYcv2Xu/w5Sx5rVs1mNWgw6BQWch HDJUsnXgdQCO4ZNVCHtkiZbWrrSV2ucC+/UpgwGTARshdO5HMgGLuE6MW6Z13mE6h11F 7vRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qZu0rN7XbI47qOfBKCpUifksFqATGovAix5yShSNmv8=; b=n8FJDt7oKTCEhNd9WNBOcW4+2c5JivvOG3tgQuj6ZHugKwFt4SXoPyVPt5Fmt6aEnR 08BNRN9XJ/2r8W7BAsHp1DgXqQvzDE3qurqWdGLFEkwHxuEaY25LrvYeMd1mewiuUoYM fDjbletO84kpav87/Y7TMi0GmO30e1mPP2IZcAva0zBVuFwE6OdMSgn7FURBIVhZ2ekK iG4fDdYQbygnHmMB71TX2E7GC6uj3S+bteGhHt7PeRVBNyKIH2WH5+IuZepma7NZe6/H jHc2PKZfvHjD6JNhBB4ZWA37rjt9X3u4sbiHX9b8O87qVz0W0rh+Sh5wbWCqxWo1B5Og l8+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b="gX/lLrW0"; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h20-20020a17090aa89400b001c361252184si1277195pjq.141.2022.03.16.20.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 20:36:44 -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; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b="gX/lLrW0"; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F35B54FA9; Wed, 16 Mar 2022 20:32:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357203AbiCPPV4 (ORCPT + 99 others); Wed, 16 Mar 2022 11:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351322AbiCPPVy (ORCPT ); Wed, 16 Mar 2022 11:21:54 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2110.outbound.protection.outlook.com [40.107.94.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8D696C913; Wed, 16 Mar 2022 08:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FL+HuH5w5QUNxz5YJZJcNwvI5VXO2iVW1+nogO3e/W0ovjtgeQMyqdapmZ2jnsUn6i455x1M2Q/cKVM/FXhzJu23DyKJCiXwMu8QDdaYhFFplxGiBlBkYioqAZAcWCFCmGC0+Ut356VwYC0dp2lb4KbHpz2b4Wv+gDyVXi4rHLJE/4N4rVBFbTzr/xqh8ilXwc6fDf7lez+16E4OujV4JEYpHZzPTLnfIeeZ+IjS5p8Rh+vGJITi8m150r+zMsiej1GZXMq6K6uKoutdVoQV4CEldGgsoLNtQl4FqSJCcy8mnRBDzAq9242JGoendhEweKvQ7h7VFlDMy7ZGtVRWtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qZu0rN7XbI47qOfBKCpUifksFqATGovAix5yShSNmv8=; b=F3U8w9CO48G4yeouw4122fslhG203FLA0D14jAxDKKuR/15Yi+ElFS6o0d57ZNJphRrl6fMIbkV9AI9GbnlwNC93+sac3eGGJz0FE+cVTTZyADePxsBDPpkGVKqySGTpKzdzIl2j8kCpB3EDeXeRaDdD0eGa94qY1CALGfZx+ZRIU/uCWV+uPzAMXw+H0opPA4dd4s0samUSsq47TiQxoOabNX4rpIrZ6lmUoZ2q8sHW9Zx9f075Tx812gUYhWXcazENS4GvOASN61ZDM6n6XJ5XEa9qexZ7pat+1l/6H7QITGbHpH5/1QUuGVRc1smXuu6dZrepdKff4lmWXmerQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qZu0rN7XbI47qOfBKCpUifksFqATGovAix5yShSNmv8=; b=gX/lLrW0J9DbKKfrtdH/LAgNhA/yQud6WrUBuyyD0nl3uEXvltHM5pRlYIrtCFzE/pe5gLLzuxVzuS2He/2UUfBPyi38lekCj5dS0+xMwASY8HGZrvUNpgDJVRsJaH0oqonOwz42HPK3KcR9EDqe9Fbylu+a7jfm3WEQQ38gnvI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from SA0PR01MB6329.prod.exchangelabs.com (2603:10b6:806:ee::12) by BN0PR01MB7103.prod.exchangelabs.com (2603:10b6:408:152::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14; Wed, 16 Mar 2022 15:20:35 +0000 Received: from SA0PR01MB6329.prod.exchangelabs.com ([fe80::f56a:e18f:b6c4:ddb5]) by SA0PR01MB6329.prod.exchangelabs.com ([fe80::f56a:e18f:b6c4:ddb5%9]) with mapi id 15.20.5061.028; Wed, 16 Mar 2022 15:20:34 +0000 Date: Wed, 16 Mar 2022 08:20:32 -0700 From: Darren Hart To: Dietmar Eggemann 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> Subject: Re: [PATCH v3] topology: make core_mask include at least cluster_siblings Message-ID: References: <20220308103012.GA31267@willie-the-truck> <7ac47c67-0b5e-5caa-20bb-a0100a0cb78f@arm.com> <9398d7ad-30e7-890a-3e18-c3011c383585@arm.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: MW4PR04CA0049.namprd04.prod.outlook.com (2603:10b6:303:6a::24) To SA0PR01MB6329.prod.exchangelabs.com (2603:10b6:806:ee::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 682b50ed-8efd-40ec-b2ba-08da07608475 X-MS-TrafficTypeDiagnostic: BN0PR01MB7103:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1+95JofcmdX/3/ZJ/8fQeB3t7c5qDUiClc6gXzJZwLEUrgIaJ4jEEmsD5UAroKRbhKygJdfSMavrg0555SjngKJEVH5lyoe/fOHk1GMrhTLycnuAwwbWreG5MvH07HZ9JgaX84vLcsKPfqiQcZD2HtOHZq7l6P8FDZGA68+XDWQbdhCOUDDqjkv2eutmGw4TAI8ZrlwtjxeAqY9o/JlG54zLOOXoNS511+rBhIETmz3B8JNOXM78tFae3KXXgkEIU4sC/aBsX7/LIKpUZKD+IM6nK6mU8rEGHvOO4oVhD0ZEIsAB5jE8rGX+kbtAiLvbwjjUtcek7MxUNjZmk0YoZH0HBzNknAaMfwrAp3671Lj1BvwxwurvNXVNOoDbvbmcvzxSr6ReydBKDmpbSzrvG9a/QOy10VTjqPNJMB4sLxR6KK57eky17x50A9DeRvJWho0eofM9M6erX3o/3zLvEmtA0gVvOm2xYWt4mb4uKbeiETRAHzT69ZglkcFVWSGKBZxPA1CWg9Mhtskw82u5vuit49tIKdO4rkLH1bpafOj/qlX0srnYljF6fT5s/ysbdChOH6/C8XbDczIHICxOHDcu+XT+qNMvJXhnYldvatKxNEm5JY4JyYrGLHQHe/xLFaTSpCEUjE598Gc5JiGXnkFBF+X2M9UsanVal/Xnk7OmO2HNocZ0fVhAjU9v1JqYZxnM3CoFZOB6PzJPvrol+Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR01MB6329.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(7916004)(366004)(2906002)(33716001)(316002)(6512007)(6916009)(9686003)(54906003)(38350700002)(186003)(38100700002)(86362001)(5660300002)(508600001)(7416002)(4326008)(8676002)(66946007)(66556008)(66476007)(26005)(8936002)(53546011)(52116002)(6506007)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gL+ArBpvxYjZHCsaUYY/3KaTknXNz5h74LlC2Ak6qr67On6edefkGP5Y1Ad6?= =?us-ascii?Q?URANqJm0O6Zy4lVKfoYTEgxjiKkCejgEg3xsTvvBnCW3QmwP0ify9jmZ/r9t?= =?us-ascii?Q?MIR9jlDsNrbnD+5iNcKs8PKE+M4suYKMtl0p7An+OEnlZyaFNNnv9y3Xj/By?= =?us-ascii?Q?0OELpPet7wPc9xo1EvFCuGl7EZciyKSp1B/1DjwCwjgrFDdQcerxK/d3EaHG?= =?us-ascii?Q?z9ROFqGgW1LAo8tVImz9z2OpMEHkVK4X4BD0AmqwiHeIpyPdOnJH1MYO5r7E?= =?us-ascii?Q?cn2/mqQXLwoUaGFqnx7sfAWx3JX8ppDYM69thRYVr6SqajQPhXd0NxbvsigT?= =?us-ascii?Q?EcVutuSK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x1Q1CH?= =?us-ascii?Q?Y5uLmlYv6ChMUvpwnCTzl+HHwyUWUHm4wRjqcT2dkp4Fms7kyyNocct9pql/?= =?us-ascii?Q?ds8j69J5JWT3n1nh7+vSDAiGvf5OC++BcnrbuSOmBYm+ZUe0QPBOFlJimsn6?= =?us-ascii?Q?HkLJPddPNcet5x/jRuocIncIyZ3JkRsChPSJfS0Ymmjvf1R9elaz+bJk8mPV?= =?us-ascii?Q?f4gvok2OL4/tm8vMq96fxqk/etPJYlt312YHKxxMB1OgAqKIcIRIRCri0rxD?= =?us-ascii?Q?KiMuRpbAECKETPg=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 682b50ed-8efd-40ec-b2ba-08da07608475 X-MS-Exchange-CrossTenant-AuthSource: SA0PR01MB6329.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2022 15:20:34.8157 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c44q/7dosQ1ggQaJU7g0RNSMPkmUvGclPep9LLpDCXaDatYFBzhsDkBInvP420FkKDRrsj5cEw+yPJcErO4qTAOjS9ZwYhdJpYhpWTG40Aa/07Y7Cw4gbdJDDjGtfUM2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR01MB7103 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 On Wed, Mar 16, 2022 at 03:48:50PM +0100, Dietmar Eggemann wrote: > - 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 > Right, understood. It is a clear expectation of the current Sched Domain topology abstraction. > 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. > > [...] Thanks Dietmar, Sudeep, do we have sufficient consensus to pull in this patch? Thanks, -- Darren Hart Ampere Computing / OS and Kernel