mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chen Yu <chen.yu@linux.dev>
To: Jemmy Wong <jemmywong512@gmail.com>
Cc: mingo@redhat.com, peterz@infradead.org,
	tim.c.chen@linux.intel.com, kprateek.nayak@amd.com,
	yu.c.chen@intel.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched/cache: Avoid publishing partial LLC utilization
Date: Wed, 14 Oct 2026 23:32:48 +0800	[thread overview]
Message-ID: <as-goGTww9QghS-R@three-body> (raw)
In-Reply-To: <20261013084338.55100-1-jemmywong512@gmail.com>

On Tue, Oct 13, 2026 at 04:43:38PM +0800, Jemmy Wong wrote:
> Date: Tue, 13 Oct 2026 16:43:38 +0800
> From: Jemmy Wong <jemmywong512@gmail.com>
> To: mingo@redhat.com, peterz@infradead.org, tim.c.chen@linux.intel.com,
>  kprateek.nayak@amd.com, yu.c.chen@intel.com
> Cc: juri.lelli@redhat.com, vincent.guittot@linaro.org,
>  dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com,
>  mgorman@suse.de, vschneid@redhat.com, linux-kernel@vger.kernel.org, Jemmy
>  Wong <jemmywong512@gmail.com>
> Subject: [PATCH v2] sched/cache: Avoid publishing partial LLC utilization
> X-Mailer: git-send-email 2.54.0
> 
> Skip publication on affinity retries using LBF_ALL_PINNED, retaining
> the first-pass snapshots and avoiding repeated cpumask checks. On the

[ ... ]

> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 57360f5cdde4..dc01fdc0526d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -12111,6 +12111,14 @@ static void record_sg_llc_stats(struct lb_env *env,
>  	if (env->sd->child != rcu_dereference_all(per_cpu(sd_llc, env->dst_cpu)))
>  		return;
> 
> +	/*
> +	 * A redo repeats stats published on the first pass. Hotplug can

It took me a while to understand the check of LBF_ALL_PINNED, to make it clear
how about adding comment below for future reference:

Once we enter record_sg_llc_stats(), LBF_ALL_PINNED being set is a
necessary and sufficient condition for being in a redo. Since
env->cpus may be incomplete when LBF_ALL_PINNED is set, and to avoid
recomputing the statistics of the same group during a redo, we skip
this update. The impact of skipping is small, because the interval
between the first pass and the subsequent redo is short.

Otherwise it looks good to me and

Reviewed-by: Chen Yu <yu.c.chen@intel.com>

thanks,
Chenyu

      parent reply	other threads:[~2026-10-14 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  8:43 Jemmy Wong
2026-10-13 17:09 ` Tim Chen
2026-10-13 17:11 ` Tim Chen
2026-10-15 12:00   ` Jemmy Wong
2026-10-14 15:32 ` Chen Yu [this message]

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=as-goGTww9QghS-R@three-body \
    --to=chen.yu@linux.dev \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=jemmywong512@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=yu.c.chen@intel.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®