diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2024-06-26 17:29:30 +0200 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2024-07-04 18:05:58 -0700 |
| commit | d73d00352145fb51d31771047aa939850d87fa50 (patch) | |
| tree | bc28ea0f7d5b5984f44fe73ab56d19fc222b3a81 /kernel/fork.c | |
| parent | memcg: mm_update_next_owner: kill the "retry" logic (diff) | |
| download | linux-d73d00352145fb51d31771047aa939850d87fa50.tar.gz linux-d73d00352145fb51d31771047aa939850d87fa50.zip | |
memcg: mm_update_next_owner: move for_each_thread() into try_to_set_owner()
mm_update_next_owner() checks the children / real_parent->children to
avoid the "everything else" loop in the likely case, but this won't work
if a child/sibling has a zombie leader with ->mm == NULL.
Move the for_each_thread() logic into try_to_set_owner(), if nothing else
this makes the children/siblings/everything searches more consistent.
Link: https://lkml.kernel.org/r/20240626152930.GA17936@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jinliang Zheng <alexjlzheng@tencent.com>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Tycho Andersen <tandersen@netflix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
0 files changed, 0 insertions, 0 deletions
