From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: thuth@redhat.com, frankja@linux.ibm.com, borntraeger@de.ibm.com,
Ulrich.Weigand@de.ibm.com, heiko.carstens@de.ibm.com,
david@redhat.com, ultrachin@163.com, akpm@linux-foundation.org,
vbabka@suse.cz, brookxu.cn@gmail.com, xiaoggchen@tencent.com,
linuszeng@tencent.com, yihuilu@tencent.com, mhocko@suse.com,
daniel.m.jordan@oracle.com, axboe@kernel.dk, legion@kernel.org,
peterz@infradead.org, aarcange@redhat.com, christian@brauner.io,
ebiederm@xmission.com, tglx@linutronix.de
Subject: [RFC v1 0/4] Two alternatives for mm async teardown
Date: Thu, 11 Nov 2021 10:50:03 +0100 [thread overview]
Message-ID: <20211111095008.264412-1-imbrenda@linux.ibm.com> (raw)
This RFC series proposes two possible ways for enabling asynchronous mm
teardown.
The first approach, in patch 1, is simply to provide an arch hook in
exit_mm. This has no functional change for archs that don't explicitly
use the hook, and leaves the hard part to arch code (including
accounting, if any).
The second approach, in patches 2 to 4, adds a new syscall to allow an
mm to be asynchronously torn down in the context of another process
(similarly to how process_mrelease works). It also adds an OOM notifier
to prevent the OOM killer from killing processes while the teardown is
in progress.
Claudio Imbrenda (4):
exit: add arch mmput hook in exit_mm
kernel/fork.c: implement new process_mmput_async syscall
mm: wire up the process_mmput_async syscall
kernel/fork.c: process_mmput_async: stop OOM while freeing memory
arch/alpha/kernel/syscalls/syscall.tbl | 2 +
arch/arm/tools/syscall.tbl | 1 +
arch/arm64/include/asm/unistd.h | 2 +-
arch/arm64/include/asm/unistd32.h | 2 +
arch/ia64/kernel/syscalls/syscall.tbl | 2 +
arch/m68k/kernel/syscalls/syscall.tbl | 2 +
arch/microblaze/kernel/syscalls/syscall.tbl | 2 +
arch/mips/kernel/syscalls/syscall_n32.tbl | 2 +
arch/mips/kernel/syscalls/syscall_n64.tbl | 2 +
arch/mips/kernel/syscalls/syscall_o32.tbl | 2 +
arch/parisc/kernel/syscalls/syscall.tbl | 2 +
arch/powerpc/kernel/syscalls/syscall.tbl | 2 +
arch/s390/kernel/syscalls/syscall.tbl | 2 +
arch/sh/kernel/syscalls/syscall.tbl | 2 +
arch/sparc/kernel/syscalls/syscall.tbl | 2 +
arch/x86/entry/syscalls/syscall_32.tbl | 1 +
arch/x86/entry/syscalls/syscall_64.tbl | 1 +
arch/xtensa/kernel/syscalls/syscall.tbl | 2 +
include/asm-generic/mmu_context.h | 4 +
include/linux/mm_types.h | 1 +
include/linux/syscalls.h | 1 +
include/uapi/asm-generic/unistd.h | 5 +-
kernel/exit.c | 2 +-
kernel/fork.c | 131 +++++++++++++++++++-
kernel/sys_ni.c | 1 +
25 files changed, 173 insertions(+), 5 deletions(-)
--
2.31.1
next reply other threads:[~2021-11-11 9:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 9:50 Claudio Imbrenda [this message]
2021-11-11 9:50 ` [RFC v1 1/4] add arch mmput hook in exit.c Claudio Imbrenda
2021-11-11 9:50 ` [RFC v1 1/4] exit: add arch mmput hook in exit_mm Claudio Imbrenda
2021-11-11 18:43 ` Eric W. Biederman
2021-11-11 9:50 ` [RFC v1 2/4] kernel/fork.c: implement new process_mmput_async syscall Claudio Imbrenda
2021-11-11 19:20 ` Eric W. Biederman
2021-11-12 9:27 ` Claudio Imbrenda
2021-11-12 9:34 ` Claudio Imbrenda
2021-11-12 14:57 ` Eric W. Biederman
2021-11-12 16:53 ` Claudio Imbrenda
2021-11-15 10:43 ` Michal Hocko
2021-11-11 9:50 ` [RFC v1 3/4] mm: wire up the " Claudio Imbrenda
2021-11-11 9:50 ` [RFC v1 4/4] kernel/fork.c: process_mmput_async: stop OOM while freeing memory Claudio Imbrenda
2021-11-12 10:15 ` [RFC v1 0/4] Two alternatives for mm async teardown Michal Hocko
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=20211111095008.264412-1-imbrenda@linux.ibm.com \
--to=imbrenda@linux.ibm.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=borntraeger@de.ibm.com \
--cc=brookxu.cn@gmail.com \
--cc=christian@brauner.io \
--cc=daniel.m.jordan@oracle.com \
--cc=david@redhat.com \
--cc=ebiederm@xmission.com \
--cc=frankja@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=legion@kernel.org \
--cc=linuszeng@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=thuth@redhat.com \
--cc=ultrachin@163.com \
--cc=vbabka@suse.cz \
--cc=xiaoggchen@tencent.com \
--cc=yihuilu@tencent.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox