mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: xupengbo <xupengbo@oppo.com>
To: <xupengbo@oppo.com>
Cc: <aaron.lu@intel.com>, <bsegall@google.com>,
	<cgroups@vger.kernel.org>, <dietmar.eggemann@arm.com>,
	<juri.lelli@redhat.com>, <linux-kernel@vger.kernel.org>,
	<mgorman@suse.de>, <mingo@redhat.com>, <peterz@infradead.org>,
	<rostedt@goodmis.org>, <vincent.guittot@linaro.org>,
	<void@manifault.com>, <vschneid@redhat.com>,
	<xupengbo1029@163.com>, <ziqianlu@bytedance.com>
Subject: Re: [PATCH v2] sched/fair: Fix unfairness caused by stalled tg_load_avg_contrib when the last task migrates out.
Date: Tue, 26 Aug 2025 16:17:31 +0800	[thread overview]
Message-ID: <20250826081731.20384-1-xupengbo@oppo.com> (raw)
In-Reply-To: <20250826075743.19106-1-xupengbo@oppo.com>

>Hi xupengbo,
>
>On Wed, Aug 06, 2025 at 04:38:10PM +0800, xupengbo wrote:
>... ... 
>> 
>> It actually becomes:
>>     if (cfs_rq->tg_load_avg_contrib > 0)
>> if cfs_rq->tg_load_avg_contrib == 0 , it will be false. As it is an unsigned
>> long, this condition is equivalent to :
>>     if (cfs_rq->tg_load_avg_contrib)
>
>I suppose we have reached a conclusion that the right fix is to add a
>check of cfs_rq->tg_load_avg_contrib in cfs_rq_is_decayed()? Something
>like below:
>
>diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>index af33d107d8034..3ebcb683063f0 100644
>--- a/kernel/sched/fair.c
>+++ b/kernel/sched/fair.c
>@@ -4056,6 +4056,9 @@ static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
> 	if (child_cfs_rq_on_list(cfs_rq))
> 		return false;
> 
>+	if (cfs_rq->tg_load_avg_contrib)
>+		return false;
>+
> 	return true;
> }
> 
>If you also agree, can you send an updated patch to fix this problem?
>Thanks.

I already sent an updated patch v3.
Link: https://lore.kernel.org/cgroups/20250826075743.19106-1-xupengbo@oppo.com/

Thanks,
xupengbo

  reply	other threads:[~2025-08-26  8:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26  7:57 [PATCH v3] " xupengbo
2025-08-26  8:17 ` xupengbo [this message]
2025-08-26  8:19 ` Aaron Lu
  -- strict thread matches above, loose matches on Subject: below --
2025-08-05 14:41 [PATCH v2] " xupengbo
2025-08-05 16:10 ` Vincent Guittot
2025-08-05  9:17 [PATCH] " Vincent Guittot
2025-08-06  6:31 ` [PATCH v2] " xupengbo
2025-08-06  7:33   ` Aaron Lu
2025-08-06  7:58     ` xupengbo
2025-08-06  8:38     ` xupengbo
2025-08-06  9:22       ` Vincent Guittot
2025-08-25  9:50       ` Aaron Lu

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=20250826081731.20384-1-xupengbo@oppo.com \
    --to=xupengbo@oppo.com \
    --cc=aaron.lu@intel.com \
    --cc=bsegall@google.com \
    --cc=cgroups@vger.kernel.org \
    --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=void@manifault.com \
    --cc=vschneid@redhat.com \
    --cc=xupengbo1029@163.com \
    --cc=ziqianlu@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®