On Mon, 21 Jul 2025 at 04:40, Huang Shijie
<shijie@xxxxxxxxxxxxxxxxxxxxxx> wrote:
detach_tasks() uses struct lb_env.loop_max as an env.src_rq->cfs_taskswhy not setting env.loop_max only once rq lock is taken in this case ?
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