From: Shijie Huang <shijie@amperemail.onmicrosoft.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
Huang Shijie <shijie@os.amperecomputing.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vschneid@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:16:17 +0800 [thread overview]
Message-ID: <dac3339d-a721-442f-8638-6e4c493f35db@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <CAKfTPtC7+V6ubaGDPy0MW2MFG7w_yrnYCPQ-b2=3uYgeM+-+EA@mail.gmail.com>
On 2025/7/21 17:40, Vincent Guittot wrote:
> On Mon, 21 Jul 2025 at 04:40, Huang Shijie
> <shijie@os.amperecomputing.com> wrote:
>> detach_tasks() uses struct lb_env.loop_max as an env.src_rq->cfs_tasks
>> iteration count limit. It is however set without the source RQ lock held,
>> and besides detach_tasks() can be re-invoked after releasing and
>> re-acquiring the RQ lock per LBF_NEED_BREAK.
>>
>> This means that env.loop_max and the actual length of env.src_rq->cfs_tasks
>> as observed within detach_tasks() can differ. This can cause some tasks to
> why not setting env.loop_max only once rq lock is taken in this case ?
Yes. we do it in this way.
Thanks
Huang Shijie
prev parent reply other threads:[~2025-07-22 3:16 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
2025-07-22 9:40 ` Shijie Huang
2025-07-22 3:16 ` Shijie Huang [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=dac3339d-a721-442f-8638-6e4c493f35db@amperemail.onmicrosoft.com \
--to=shijie@amperemail.onmicrosoft.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 \
--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®