The quilt patch titled Subject: mm, oom: add lru_add_drain() in __oom_reap_task_mm() has been removed from the -mm tree. Its filename was mm-oom-add-lru_add_drain-in-__oom_reap_task_mm.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Jianfeng Wang <jianfeng.w.wang@xxxxxxxxxx> Subject: mm, oom: add lru_add_drain() in __oom_reap_task_mm() Date: Tue, 9 Jan 2024 01:15:11 -0800 The oom_reaper tries to reclaim additional memory owned by the oom victim. In __oom_reap_task_mm(), it uses mmu_gather for batched page free. After oom_reaper was added, the mmu_gather CONFIG_MMU_GATHER_NO_GATHER feature was introduced in commit 952a31c9e6fa ("asm-generic/tlb: Introduce CONFIG_HAVE_MMU_GATHER_NO_GATHER=y"). This is an option to skip batched page freeing. If set, tlb_batch_pages_flush(), which is responsible for calling lru_add_drain(), is skipped during tlb_finish_mmu(). Without this, pages could still be held by per-cpu fbatches rather than being freed. This fix adds lru_add_drain() prior to mmu_gather. This makes the code consistent with other cases where mmu_gather is used for freeing pages. Link: https://lkml.kernel.org/r/20240109091511.8299-1-jianfeng.w.wang@xxxxxxxxxx Signed-off-by: Jianfeng Wang <jianfeng.w.wang@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/oom_kill.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/oom_kill.c~mm-oom-add-lru_add_drain-in-__oom_reap_task_mm +++ a/mm/oom_kill.c @@ -538,6 +538,7 @@ static bool __oom_reap_task_mm(struct mm struct mmu_notifier_range range; struct mmu_gather tlb; + lru_add_drain(); mmu_notifier_range_init(&range, MMU_NOTIFY_UNMAP, 0, mm, vma->vm_start, vma->vm_end); _ Patches currently in -mm which might be from jianfeng.w.wang@xxxxxxxxxx are