mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: yu.c.chen@intel.com
Cc: peterz@infradead.org, mingo@redhat.com,
	tim.c.chen@linux.intel.com, kayracizmeci@gmail.com,
	kprateek.nayak@amd.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,
	zhanxusheng@xiaomi.com
Subject: Re: [PATCH] sched/cache: Check reduced capacity before alb_break_llc()
Date: Thu, 29 Oct 2026 16:55:29 +0800	[thread overview]
Message-ID: <20261029085530.4054159-1-zhanxusheng1024@gmail.com> (raw)
In-Reply-To: <auMBWAGx04w5h80o@chenyu-dev>

Hi Chenyu,

On Thu, Oct 29, 2026 at 04:18:32PM +0800, Chen Yu wrote:
> Moving the capacity check earlier seems to completely ignore the
> task's LLC preference. It seems to be a trade-off between choosing
> CPU capacity and cache re-population on a remote LLC, and cross-LLC
> access latency due to cross-LLC migration. I don't know which one has
> more impact, it looks to be workload-specific. May I know which
> benchmark/platform you used to find this issue? I'd like to launch
> hackbench/tbench/schbenh/netperf(or yours) to evaluate the impact.

No benchmark, I found it reading the code and reproduced it in QEMU
with -smp 4,sockets=2,cores=2 and IRQ_TIME_ACCOUNTING.  A module spends
600us of every 1ms in an hrtimer handler on CPU0, CPU1 runs a pinned
busy loop, and the test process has one busy thread and one thread that
only sleeps (cache aware scheduling skips single-threaded processes).
It starts pinned to CPU0 and is then allowed on all CPUs.  I can send
the module and the program.

The LLC preference is only overridden when the capacity check fires,
which is the same condition as your reduced_cap_alb().

> May I know if the issue is because of the
> if (env->src_rq->nr_running <= 1)
> 	return true
> in alb_break_llc()?

Yes.

> If yes, to mitigate the possible impact, do you think tuning the
> alb_break_llc() would be safer?

I tried your two patches on the same setup.  The task still stays on
CPU0 for the whole 20 seconds, at about 1.8e7 iterations/s against
4.6e7 with cache aware scheduling disabled.  Without the early return,
alb_break_llc() falls through to can_migrate_llc(), which still
forbids moving the task off its preferred LLC here.

Thanks,
Zhan Xusheng

      reply	other threads:[~2026-10-29  8:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  2:36 Zhan Xusheng
2026-10-29  7:13 ` Kayra Cizmeci
2026-10-29  7:50   ` Zhan Xusheng
2026-10-29  8:13     ` Kayra Cizmeci
2026-10-29  8:18   ` Chen Yu
2026-10-29  8:18 ` Chen Yu
2026-10-29  8:55   ` Zhan Xusheng [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=20261029085530.4054159-1-zhanxusheng1024@gmail.com \
    --to=zhanxusheng1024@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kayracizmeci@gmail.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 \
    --cc=zhanxusheng@xiaomi.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®