mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Jemmy Wong <jemmywong512@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot	 <vincent.guittot@linaro.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt	 <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman	 <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak	 <kprateek.nayak@amd.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] sched/fair: Rename group_imbalanced to group_pinned_task
Date: Thu, 01 Oct 2026 14:54:59 -0700	[thread overview]
Message-ID: <88f28ac61e238cef9bcf8bda3adb4326c15ba15e.camel@linux.intel.com> (raw)
In-Reply-To: <20260928042018.10618-3-jemmywong512@gmail.com>

On Mon, 2026-09-28 at 12:20 +0800, Jemmy Wong wrote:
> The name dates back to the original group_imb heuristic, which flagged
> a group when the load difference between its busiest and idlest CPU
> exceeded the average task load. Commit 6263322c5e8f ("sched/fair:
> Rewrite group_imb trigger") replaced that heuristic: the flag is now
> set only when a lower domain fails to balance because tasks are pinned
> by cpus_ptr (LBF_SOME_PINNED), and kept while all tasks are pinned
> (LBF_ALL_PINNED). The name was carried over unchanged and later became
> group_imbalanced in commit 0b0695f2b34a ("sched/fair: Rework
> load_balance()").
> 
> Today the name no longer matches the condition:
> 
>  - group_classify() checks group_overloaded first, so a group whose
>    load really is skewed is usually not classified as imbalanced,
>    while a flagged group may carry a single extra task.
> 
>  - calculate_imbalance() does not measure any imbalance for this type;
>    it moves one task (migrate_task, imbalance = 1).
> 
>  - Elsewhere in fair.c "imbalance" consistently means the amount of
>    load to move (env->imbalance, imbalance_pct, calculate_imbalance(),
>    the lb_imbalance_* schedstats), and imbalanced_active_balance() uses
>    "imbalanced" for repeated balance failures, unrelated to this flag.
> 
> Rename it to group_pinned_task, which describes the condition that
> raises it and follows the adjective_noun pattern of group_misfit_task.
> The enum is local to fair.c, so no tracepoint, schedstat or other
> user-visible interface is affected.
> 
> No functional change.
> 
> Signed-off-by: Jemmy Wong <jemmywong512@gmail.com>
> ---
>  kernel/sched/fair.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index f9ddcecfd19d..aa63950976aa 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -10363,7 +10363,7 @@ enum group_type {
>  	 * The tasks' affinity constraints previously prevented the scheduler
>  	 * from balancing the load across the system.
>  	 */
> -	group_imbalanced,
> +	group_pinned_task,

I believe we are trying to fix imbalance due to pinned tasks.
Perhaps group_pinned_imbalance is more descriptive.

Tim



  reply	other threads:[~2026-10-01 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  4:20 [PATCH 0/3] sched/fair: Update decision matrix and rename pinned-task group state Jemmy Wong
2026-09-28  4:20 ` [PATCH 1/3] sched/fair: Add smt_balance and llc_balance to the decision matrix Jemmy Wong
2026-10-01 21:34   ` Tim Chen
2026-10-02 11:02     ` Jemmy Wong
2026-09-28  4:20 ` [PATCH 2/3] sched/fair: Rename group_imbalanced to group_pinned_task Jemmy Wong
2026-10-01 21:54   ` Tim Chen [this message]
2026-10-02 11:03     ` Jemmy Wong
2026-09-28  4:20 ` [PATCH 3/3] sched/fair: Rename sgc->imbalance to sgc->pinned_task Jemmy Wong

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=88f28ac61e238cef9bcf8bda3adb4326c15ba15e.camel@linux.intel.com \
    --to=tim.c.chen@linux.intel.com \
    --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=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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®