From: Lu Wang <wanglu.priv@gmail.com>
To: yu.c.chen@intel.com, Tim Chen <tim.c.chen@linux.intel.com>
Cc: peterz@infradead.org, mingo@redhat.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, kprateek.nayak@amd.com,
linux-kernel@vger.kernel.org, chen.yu@linux.dev,
Lu Wang <wanglu.priv@gmail.com>
Subject: Re: [PATCH] sched/cache: honor migrate_llc_task semantics in active load balance
Date: Fri, 7 Aug 2026 17:58:25 +0800 [thread overview]
Message-ID: <20260807095825.1595970-1-wanglu.priv@gmail.com> (raw)
In-Reply-To: <fba2914c-5d98-4587-914a-260a13eb93be@intel.com>
Thanks, both.
On Fri, 2026-08-07 at 14:48 +0800, Chen, Yu C wrote:
> On 8/7/2026 1:22 AM, Tim Chen wrote:
> > On Thu, 2026-08-06 at 23:35 +0800, Chen, Yu C wrote:
> > > It looks like this proposal provides fine-grain control on per-task base
> > > migration strategy is promising.
> > >
> > > If we overwrite migration_type for ALB (default is 0, i.e. migrate_load),
> > > then in can_migrate_task() a delayed task might not be migrated in ALB:
> > >
> > > if ((p->se.sched_delayed) && (env->migration_type != migrate_load))
> > > return 0;
> > >
> > > So an enhanced approach I'm thinking of is to pass
> > > migrate_llc_task information via env->flags:
> > >
> > > #define LBF_ACTIVE_LB_LLC 0x40
> > >
> > > static int active_load_balance_cpu_stop(void *data)
> > > {
> > > return __active_load_balance_cpu_stop(data, 0);
> > > }
> > >
> > > static int active_load_balance_llc_cpu_stop(void *data)
> > > {
> > > return __active_load_balance_cpu_stop(data, LBF_ACTIVE_LB_LLC);
> > > }
> >
> > This is a good catch.
> >
> > It may be easier to create a migrate_llc_task_alb type and pass that
> > in migration type. Then modify the above as
> >
> > if ((p->se.sched_delayed) && env->migration_type != migrate_load
> > && env->migration_type != migrate_llc_task_alb)
> > return 0
>
> We still need a channel to carry migrate_llc_task/migrate_llc_task_alb
> into the alb, since the stopper builds a fresh lb_env - hence
> rq->active_balance_type was introduced in Lu Wang's proposal. We can
> reuse the callback slot in active_balance_work instead, pick
> active_load_balance_llc_cpu_stop() at kick time, thus no new rq field
> is needed.
Good catch. I agree that overwriting migration_type in the stopper
changes the existing delayed-dequeue behavior.
Picking the callback at kick time and dropping the rq field looks
like the cleanest version of this so far -- it fixes the
original issue I raised without affecting delayed-dequeue behavior.
I agree with refactoring the patch along this idea and send patchV3.
Lu Wang
next prev parent reply other threads:[~2026-08-07 9:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-01 12:22 [PATCH] sched/cache: honor migrate_llc_task semantics in active load balance Lu Wang
2026-08-03 4:20 ` Chen, Yu C
2026-08-03 10:02 ` Lu Wang
2026-08-04 0:10 ` Tim Chen
2026-08-04 8:17 ` Chen, Yu C
2026-08-04 15:07 ` Lu Wang
2026-08-04 19:42 ` Tim Chen
2026-08-05 2:38 ` wanglu15
2026-08-05 16:04 ` Tim Chen
2026-08-05 16:43 ` Chen, Yu C
2026-08-06 16:21 ` Tim Chen
2026-08-04 8:30 ` Lu Wang
2026-08-06 15:35 ` Chen, Yu C
2026-08-06 17:22 ` Tim Chen
2026-08-07 6:48 ` Chen, Yu C
2026-08-07 9:58 ` Lu Wang [this message]
2026-08-09 10:53 ` [PATCH v2] " Lu Wang
-- strict thread matches above, loose matches on Subject: below --
2026-08-01 12:17 [PATCH] " Lu Wang
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=20260807095825.1595970-1-wanglu.priv@gmail.com \
--to=wanglu.priv@gmail.com \
--cc=bsegall@google.com \
--cc=chen.yu@linux.dev \
--cc=dietmar.eggemann@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.