linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Qing Wang <wangqing@vivo.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] arch_topology: support parsing cluster_id from DT
Date: Thu, 12 May 2022 12:58:50 +0200	[thread overview]
Message-ID: <89525069-4fd5-2fd8-20eb-5af240a4bceb@arm.com> (raw)
In-Reply-To: <1652262776-3056-1-git-send-email-wangqing@vivo.com>

On 11/05/2022 11:52, Qing Wang wrote:
> From: Wang Qing <wangqing@vivo.com>

[...]

> @@ -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.

  reply	other threads:[~2022-05-12 10:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  9:52 [PATCH V2] arch_topology: support parsing cluster_id from DT Qing Wang
2022-05-12 10:58 ` Dietmar Eggemann [this message]
2022-05-12 11:21   ` 王擎
2022-05-12 14:17 ` Sudeep Holla
2022-05-13  8:30   ` 王擎
2022-05-13  8:46     ` Sudeep Holla
2022-05-13  8:36   ` Dietmar Eggemann
2022-05-13  8:56     ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89525069-4fd5-2fd8-20eb-5af240a4bceb@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=wangqing@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).