Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1002723iob; Thu, 12 May 2022 09:04:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2kAxpNzmSUX5/OSj2sgLyRPMmsdlwK9j0n1UOOZt42YSAvy0l90U6YnuEjhZaVFf/bO9L X-Received: by 2002:a17:907:72ce:b0:6f4:5a57:320c with SMTP id du14-20020a17090772ce00b006f45a57320cmr539570ejc.75.1652371468278; Thu, 12 May 2022 09:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652371468; cv=none; d=google.com; s=arc-20160816; b=KnaxWMzEVjMITcFsvLMMp5PN0Un6B7l5cIP7S7YaOuI+YuY4MTIe9FpDcj7UZHqT71 UMVYzH9bY+LbefsqogcWh0u0x8x5MImlYjwaO4CY6YJ2eo9txxgyz3ZHdHy+F+OGMJS4 xbCJVX/eykM8YBsDZ+FVI3nfo6lOVCZrGq6L9ond3tuvY1+pgRGo9lnGhtqel/Y1RCRD hcZxB+Pxd0ISMS2Qkxfm2lrh+ex/rMGZxXXKW058uG3UF574UOUIDhCHFJ7kf9/TXBZQ 03cnyiLRfvsDFwwWlKjk6DwyrT+tjPZhdsdsRVUqzxrpDyI1KpH6n5eFoVUtuRmnMPVE rN0w== 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:to:content-language:subject:user-agent:mime-version:date :message-id; bh=73xi9pzBwAytuTtuuhs33UJjU3GuUAQnLt4iJ9/iDE4=; b=bZT/FYZ9jKe0IPHMHsQ31j+7Ez/xP/IxkSeUxSX5niahQrpken/zPRzgCxxC1JJjwN BTu2E/bY9uVmCBfarozPpCcLqm+hCsh/O9zEfN/epWghC7EJfTdnCeMx4ZHeTV/NA+c7 JThJb0EsfDHAAqKmX9nS0Jd/4wHyy7HFY2/TyXhqja6sr6dlnql6TYBfxtxqxHyCey0P svCzL5FCWr7Bz7r/2KaaZF85WnrJ5i41QmtLw950vXS7apyQ+lFzDUgAluizWWsFuL7Q t0e/LTNz+PgNzvTfSKp12cnL92a8/UOi+QpMdAoz+B30mG97KWJ0lMw3OigiUqfcwLSx GLmg== 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 y17-20020a056402359100b00427c7649503si7164118edc.628.2022.05.12.09.04.01; Thu, 12 May 2022 09:04:28 -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 S1352899AbiELK7L (ORCPT + 99 others); Thu, 12 May 2022 06:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238426AbiELK7J (ORCPT ); Thu, 12 May 2022 06:59:09 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D71CCEABAB for ; Thu, 12 May 2022 03:59:07 -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 AE85C106F; Thu, 12 May 2022 03:59:07 -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 B008A3F66F; Thu, 12 May 2022 03:59:06 -0700 (PDT) Message-ID: <89525069-4fd5-2fd8-20eb-5af240a4bceb@arm.com> Date: Thu, 12 May 2022 12:58:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH V2] arch_topology: support parsing cluster_id from DT Content-Language: en-US To: Qing Wang , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org References: <1652262776-3056-1-git-send-email-wangqing@vivo.com> From: Dietmar Eggemann In-Reply-To: <1652262776-3056-1-git-send-email-wangqing@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.8 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 11/05/2022 11:52, Qing Wang wrote: > From: Wang Qing [...] > @@ -582,7 +594,8 @@ static int __init parse_cluster(struct device_node *cluster, int depth) > } > > if (leaf) { > - ret = parse_core(c, package_id, core_id++); > + ret = parse_core(c, package_id, (depth == 2)?cluster_id : -1, > + core_id++); > } else { > pr_err("%pOF: Non-leaf cluster with core %s\n", > cluster, name); > @@ -599,9 +612,6 @@ static int __init parse_cluster(struct device_node *cluster, int depth) > if (leaf && !has_cores) > pr_warn("%pOF: empty cluster\n", cluster); > > - if (leaf) > - package_id++; > - > return 0; > } The issue I mentioned under https://lkml.kernel.org/r/bd746cf0-0fdd-1ee6-d394-67fffb5d9b58@arm.com still exists. Btw, I recommend the following test strategy. (A) Create a set of dts files which represent today's topologies in DT: (1) 8 CPUs flat (Arm DynamIQ single DSU) (2) 2 groups of 4 CPUs (e.g. hikey 960) (which covers Phantom* domain) (3) your QC SM8450 Armv9 tri-gear (4-3-1) DynamIQ single DSU w/ shared L2 btwn CPU0-1 and CPU2-3. ... * used in Android (B) Compile dtb's dtc -I dts -O dtb -o foo.dtb foo.dts (C) Run them under qemu w/ and w/o CONFIG_SCHED_CLUSTER and check: sudo qemu-system-aarch64 ... -dtb foo.dtb (1) sched domains: cat /sys/kernel/debug/sched/domains/cpu*/domain*/name (2) sched flags: cat /sys/kernel/debug/sched/domains/cpu*/domain*/flags (3) cpumasks: cat /proc/schedstat | awk '{print $1 " " $2 }' | grep ^[cd] You can even mention the test results in your patch so that people see that you already covered them. This will speed up the review-process enormously.