Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3022954pxp; Mon, 14 Mar 2022 09:18:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrNPcm1a+n3xst+F4XuZ0OUTxWXd8BRNLIAL37Be+y2NLYeT3EOvxCbwwoWs63HU7j3Tyk X-Received: by 2002:a63:8448:0:b0:380:5b8f:140c with SMTP id k69-20020a638448000000b003805b8f140cmr20963826pgd.130.1647274738955; Mon, 14 Mar 2022 09:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647274738; cv=none; d=google.com; s=arc-20160816; b=YMaBui6304XxJqkezxQBqqMPKlaNdmqJi/KwVfjmLemnWMS6pl1/KwcnrVOJ+iQllR vTSQP4+85r+FRcupQ0HNhOMwsJ2BvGVFAh4uGcjLlKp4TJIXy0UFFCXhRQclIEBtPRWe m0VJHeJYWS9apnga4sZMN3UhZAfndtgQiWOgi69KKQQoKXC7C/Yv0sFsWgRz3PV0/JNW dZCo66QsR1roYJ+4ZPoQyKeg1VN5he3ta0jbQnDJ5jqufa+/8XPQb6tzDD1zZy4XCVpI kaRsxvhPXTKsebasCi4jwOaJLA2npLztteido9FuLwiskphoIkEelcg4ulC0aJkCGlsY mpMQ== 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=SDI9uqjN0rZwnQhYGRCfuIdmA/H3J5hDy1ozM9p9VX8=; b=IIKxMd7es/PysOwG0mt5sk1I0zuKeMPDiczS7p8ODp+NjcZC67ourKdsfIA0a1mZH2 ssRXuXVsxDE881I3p0l5m/wiTGdjt3/cvZSuSF996W0657cVEmjefF9mSdb5AXzWBF/+ Wu6o82/HSHZ36E9hMq5qfoXufLEmJY/spwTS+EKrmDmeuyH363S9pdPuGhdQuX6sOqXK sFpd3uJHVKoUFbxbf3Qr7JFigaW+1MzsI4OdCgT8smGbO3UxurBa7TsvuRA58lWAr8xK oE4qHfm3vRi9npojRiKyCz8VwoVmZZptL+VxM2X9zhpl3f8NcRWy2SNb/DtR9UPbIPLH 8tZA== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t71-20020a63814a000000b003813e222ddbsi2678963pgd.37.2022.03.14.09.18.45; Mon, 14 Mar 2022 09:18:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236147AbiCNJja (ORCPT + 99 others); Mon, 14 Mar 2022 05:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235071AbiCNJj3 (ORCPT ); Mon, 14 Mar 2022 05:39:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 54A30DEF6; Mon, 14 Mar 2022 02:38:16 -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 B371BED1; Mon, 14 Mar 2022 02:38:15 -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 CA2B63F99C; Mon, 14 Mar 2022 02:38:12 -0700 (PDT) Message-ID: <35344252-5284-b08e-fec7-6dc99476b4b0@arm.com> Date: Mon, 14 Mar 2022 10:37:21 +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 , Barry Song , Valentin Schneider , "D . Scott Phillips" , Ilkka Koskinen , stable@vger.kernel.org References: <20220308103012.GA31267@willie-the-truck> <7ac47c67-0b5e-5caa-20bb-a0100a0cb78f@arm.com> From: Dietmar Eggemann In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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: >> >> [...] >> >>>> IMHO, if core_mask weight is 1, MC will be removed/degenerated anyway. >>>> >>>> This is what I get on my Ampere Altra (I guess I don't have the ACPI >>>> changes which would let to a CLS sched domain): >>>> >>>> # cat /sys/kernel/debug/sched/domains/cpu0/domain*/name >>>> DIE >>>> NUMA >>>> root@oss-altra01:~# zcat /proc/config.gz | grep SCHED_CLUSTER >>>> CONFIG_SCHED_CLUSTER=y >>> >>> I'd like to follow up on this. Would you share your dmidecode BIOS >>> Information section? >> >> # dmidecode -t 0 >> # dmidecode 3.2 >> Getting SMBIOS data from sysfs. >> SMBIOS 3.2.0 present. >> >> Handle 0x0000, DMI type 0, 26 bytes >> BIOS Information >> Vendor: Ampere(TM) >> Version: 0.9.20200724 >> Release Date: 2020/07/24 >> ROM Size: 7680 kB >> Characteristics: >> PCI is supported >> BIOS is upgradeable >> Boot from CD is supported >> Selectable boot is supported >> ACPI is supported >> UEFI is supported >> BIOS Revision: 5.15 >> Firmware Revision: 0.6 >> > > Thank you, I'm following internally and will get with you. Looks like in my PPTT, the `Processor Hierarchy Nodes` which represents cluster nodes have no valid `ACPI Processor ID`. Example for CPU0: cpu_node-: [1B9Ch 7068 1] Subtable Type : 00 [Processor Hierarchy Node] [1B9Dh 7069 1] Length : 1C [1B9Eh 7070 2] Reserved : 0000 [1BA0h 7072 4] Flags (decoded below) : 0000001A Physical package : 0 ACPI Processor ID valid : 1 <-- valid !!! Processor is a thread : 0 Node is a leaf : 1 Identical Implementation : 1 [1BA4h 7076 4] Parent : 00001B88 <-- parent !!! [1BA8h 7080 4] ACPI Processor ID : 00001200 [1BACh 7084 4] Private Resource Number : 00000002 [1BB0h 7088 4] Private Resource : 00001B58 [1BB4h 7092 4] Private Resource : 00001B70 cluster_node (cpu_node->parent): [1B88h 7048 1] Subtable Type : 00 [Processor Hierarchy Node] [1B89h 7049 1] Length : 14 [1B8Ah 7050 2] Reserved : 0000 [1B8Ch 7052 4] Flags (decoded below) : 00000010 Physical package : 0 ACPI Processor ID valid : 0 <-- not valid !!! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Processor is a thread : 0 Node is a leaf : 0 Identical Implementation : 1 [1B90h 7056 4] Parent : 000001C8 [1B94h 7060 4] ACPI Processor ID : 00000000 [1B98h 7064 4] Private Resource Number : 00000000 The code which checks this is: int find_acpi_cpu_topology_cluster(unsigned int cpu) { .... if (cluster_node->flags & ACPI_PPTT_ACPI_PROCESSOR_ID_VALID) retval = cluster_node->acpi_processor_id; else retval = ACPI_PTR_DIFF(cluster_node, table); The else patch just returns distinct values for each CPU, so there is no sub-grouping of CPUs which can lead to a CLS SD.