From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,schwidefsky@de.ibm.com,peterz@infradead.org,mhocko@suse.com,jianfeng.w.wang@oracle.com,akpm@linux-foundation.org
Subject: [to-be-updated] mm-oom-add-lru_add_drain-in-__oom_reap_task_mm.patch removed from -mm tree
Date: Thu, 11 Jan 2024 13:54:20 -0800 [thread overview]
Message-ID: <20240111215421.52135C433F1@smtp.kernel.org> (raw)
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
reply other threads:[~2024-01-11 21:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111215421.52135C433F1@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=jianfeng.w.wang@oracle.com \
--cc=mhocko@suse.com \
--cc=mm-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.