The quilt patch titled Subject: mm: oom: terminate the oom_evaluate_task() loop early has been removed from the -mm tree. Its filename was mm-oom-terminate-the-oom_evaluate_task-loop-early.patch This patch was dropped because it was nacked ------------------------------------------------------ From: ZhangPeng <zhangpeng362@xxxxxxxxxx> Subject: mm: oom: terminate the oom_evaluate_task() loop early Date: Mon, 14 Aug 2023 14:34:28 +0800 If task is allocating a lot of memory and has been marked to be killed first, then it gets the highest score (LONG_MAX). Therefore, there is no need to continue to calculate the points of other tasks. Just terminate the oom_evaluate_task() loop early, when the task with the highest score is found. By doing this, we can get some performance gains in select_bad_process(). To implement it, the return value of oom_evaluate_task() is modified. When the task with the highest score is found (points == LONG_MAX), oom_evaluate_task() will return 1 and the loop will terminate early. Link: https://lkml.kernel.org/r/20230814063428.4111206-3-zhangpeng362@xxxxxxxxxx Signed-off-by: ZhangPeng <zhangpeng362@xxxxxxxxxx> Cc: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Nanyong Sun <sunnanyong@xxxxxxxxxx> Cc: Shakeel Butt <shakeelb@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+) --- a/mm/oom_kill.c~mm-oom-terminate-the-oom_evaluate_task-loop-early +++ a/mm/oom_kill.c @@ -346,6 +346,8 @@ static int oom_evaluate_task(struct task get_task_struct(task); oc->chosen = task; oc->chosen_points = points; + if (points == LONG_MAX) + return 1; next: return 0; abort: _ Patches currently in -mm which might be from zhangpeng362@xxxxxxxxxx are mm-kmsan-use-helper-function-page_size.patch mm-kmsan-use-helper-macro-offset_in_page.patch mm-kmsan-use-helper-macros-page_align-and-page_align_down.patch mm-remove-redundant-k-macro-definition.patch mm-swapfilec-use-helper-macro-k.patch mm-swap_statec-use-helper-macro-k.patch mm-shmemc-use-helper-macro-k.patch mm-nommuc-use-helper-macro-k.patch mm-mmapc-use-helper-macro-k.patch mm-hugetlbc-use-helper-macro-k.patch mm-page_alloc-remove-unused-parameter-from-reserve_highatomic_pageblock.patch mm-secretmem-use-a-folio-in-secretmem_fault.patch