mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Chuyi Zhou <zhouchuyi@bytedance.com>, <mingo@redhat.com>,
	<peterz@infradead.org>, <juri.lelli@redhat.com>,
	<vincent.guittot@linaro.org>, <dietmar.eggemann@arm.com>,
	<rostedt@goodmis.org>, <bsegall@google.com>, <mgorman@suse.de>,
	<vschneid@redhat.com>
Cc: <chengming.zhou@linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] sched/fair: Ignore isolated cpus in update_numa_stat
Date: Wed, 18 Dec 2024 11:56:19 +0530	[thread overview]
Message-ID: <92168453-ecf0-4849-970d-4c19a5a610dc@amd.com> (raw)
In-Reply-To: <20241216122357.1276382-3-zhouchuyi@bytedance.com>

Hello Chuyi,

On 12/16/2024 5:53 PM, Chuyi Zhou wrote:
> [..snip..] 
> @@ -2125,6 +2125,11 @@ static void update_numa_stats(struct task_numa_env *env,
>   	for_each_cpu(cpu, cpumask_of_node(nid)) {

Looking at sched_init_domains(), we only build sched domains only for
active CPUs in housekeeping_cpumask(HK_TYPE_DOMAIN) so similar to the
question on Patch 3, can we get away with just modifying this outer loop
to:

	for_each_cpu_and(cpu, cpumask_of_node(nid), housekeeping_cpumask(HK_TYPE_DOMAIN)) {
		...
	}

Thoughts?

-- 
Thanks and Regards,
Prateek

>   		struct rq *rq = cpu_rq(cpu);
>   
> +		/* skip isolated cpus' load */
> +		if (!rcu_dereference(rq->sd))
> +			continue;
> +
> +		ns->weight++;
>   		ns->load += cpu_load(rq);
>   		ns->runnable += cpu_runnable(rq);
>   		ns->util += cpu_util_cfs(cpu);
> @@ -2144,8 +2149,6 @@ static void update_numa_stats(struct task_numa_env *env,
>   	}
>   	rcu_read_unlock();
>   
> -	ns->weight = cpumask_weight(cpumask_of_node(nid));
> -
>   	ns->node_type = numa_classify(env->imbalance_pct, ns);
>   
>   	if (idle_core >= 0)



  reply	other threads:[~2024-12-18  6:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16 12:23 [PATCH 0/3] Take the scheduling domain into account in numa balancing Chuyi Zhou
2024-12-16 12:23 ` [PATCH 1/3] sched/fair: Remove unused task_numa_migrate return value Chuyi Zhou
2024-12-18  6:29   ` K Prateek Nayak
2024-12-23 12:34     ` Chuyi Zhou
2024-12-16 12:23 ` [PATCH 2/3] sched/fair: Ignore isolated cpus in update_numa_stat Chuyi Zhou
2024-12-18  6:26   ` K Prateek Nayak [this message]
2024-12-18  7:19     ` [External] " Chuyi Zhou
2024-12-16 12:23 ` [PATCH 3/3] sched/fair: Ensure select housekeeping cpus in task_numa_find_cpu Chuyi Zhou
2024-12-18  6:21   ` K Prateek Nayak
2024-12-23 12:58     ` Chuyi Zhou
2024-12-27  4:40       ` K Prateek Nayak
2024-12-27  7:59         ` Chuyi Zhou
2025-01-02  5:49           ` K Prateek Nayak

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=92168453-ecf0-4849-970d-4c19a5a610dc@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=bsegall@google.com \
    --cc=chengming.zhou@linux.dev \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=zhouchuyi@bytedance.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

all inboxes | Powered by JetHome®