* [to-be-updated] mm-oom-add-lru_add_drain-in-__oom_reap_task_mm.patch removed from -mm tree
@ 2024-01-11 21:54 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-01-11 21:54 UTC (permalink / raw)
To: mm-commits, schwidefsky, peterz, mhocko, jianfeng.w.wang, akpm
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@oracle.com>
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@oracle.com
Signed-off-by: Jianfeng Wang <jianfeng.w.wang@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
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@oracle.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-11 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 21:54 [to-be-updated] mm-oom-add-lru_add_drain-in-__oom_reap_task_mm.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.