mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valentin Schneider <vschneid@redhat.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Huang Shijie <shijie@os.amperecomputing.com>,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	patches@amperecomputing.com, cl@linux.com,
	Shubhang@os.amperecomputing.com, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] sched/fair: do not scan twice in detach_tasks()
Date: Tue, 22 Jul 2025 11:01:33 +0200	[thread overview]
Message-ID: <xhsmhseioeh02.mognet@vschneid-thinkpadt14sgen2i.remote.csb> (raw)
In-Reply-To: <CAKfTPtBxtAu1=p22Z5N7_EMeTMyRvN-gQDa_G==dTDDKtPdYzA@mail.gmail.com>

On 22/07/25 09:53, Vincent Guittot wrote:
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 1b3879850a9e..636798d53798 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -11702,12 +11702,16 @@ static int sched_balance_rq(int this_cpu,
>> struct rq *this_rq,
>>                  * still unbalanced. ld_moved simply stays zero, so it is
>>                  * correctly treated as an imbalance.
>>                  */
>> -               env.loop_max  = min(sysctl_sched_nr_migrate,
>> busiest->nr_running);
>>
>>  more_balance:
>>                 rq_lock_irqsave(busiest, &rf);
>>                 update_rq_clock(busiest);
>>
>> +               if (!env.loop_max)
>> +                       env.loop_max = min(sysctl_sched_nr_migrate,
>> busiest->cfs.h_nr_runnable);
>
> it should be h_nr_queued as mentioned by Huang and my patch has been
> messed up by my web browser
>

Works for me.


  reply	other threads:[~2025-07-22  9:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21  2:39 Huang Shijie
2025-07-21  9:40 ` Vincent Guittot
2025-07-21 11:25   ` Valentin Schneider
2025-07-22  3:26     ` Shijie Huang
2025-07-22  7:49     ` Vincent Guittot
2025-07-22  7:53       ` Vincent Guittot
2025-07-22  9:01         ` Valentin Schneider [this message]
2025-07-22  9:40         ` Shijie Huang
2025-07-22  3:16   ` Shijie Huang

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=xhsmhseioeh02.mognet@vschneid-thinkpadt14sgen2i.remote.csb \
    --to=vschneid@redhat.com \
    --cc=Shubhang@os.amperecomputing.com \
    --cc=bsegall@google.com \
    --cc=cl@linux.com \
    --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=patches@amperecomputing.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=shijie@os.amperecomputing.com \
    --cc=vincent.guittot@linaro.org \
    /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®