From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Aditya Sharma <adi.sharma@zohomail.in>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>
Cc: David Rientjes <rientjes@google.com>,
Shakeel Butt <shakeel.butt@linux.dev>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Kees Cook <kees@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
imbrenda@linux.ibm.com
Subject: Re: [RFC PATCH 0/7] mm: defer address-space teardown of large exiting processes to a kthread
Date: Mon, 20 Jul 2026 09:13:34 +0100 [thread overview]
Message-ID: <d1180a70-f4b4-4c22-9ce5-881cb0e2370d@kernel.org> (raw)
In-Reply-To: <20260719185409.409685-1-adi.sharma@zohomail.in>
On 7/19/26 19:54, Aditya Sharma wrote:
> Address-space teardown on process exit runs synchronously in the dying
> task's context: exit_mm() -> mmput() -> __mmput() -> exit_mmap() walks
> page tables, updates rmap, frees the RSS and drops file references, all
> on the exiting CPU. For a multi-GB process that is hundreds of
> milliseconds of exit-path latency, paid by whoever is waiting on the
> death: a supervisor's kill-and-respawn cycle, a shell's waitpid(), an
> orchestrator reaping a fleet of workers. On the test box below, killing
> a 16GB process costs ~280ms before the parent's waitpid() returns.
>
> This series adds CONFIG_ASYNC_MM_TEARDOWN: an opt-in, default-off path
> that defers __mmput() of large exiting processes to a dedicated kernel
> thread (mm_reaper), so the exiting CPU is released as soon as the task
> is reaped and the teardown runs off to the side.
QEMU has an rather short implementation for async teardown using
clone(CLONE_VM), which is IIRC essentially the result of Claudios previous
kernel work you note below.
So nothing got merged because the problem was solvable in userspace.
Without something like CONFIG_ASYNC_MM_TEARDOWN in the kernel.
[1] https://github.com/qemu/qemu/blob/master/system/async-teardown.c
--
Cheers,
David
next prev parent reply other threads:[~2026-07-20 8:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-19 18:54 [RFC PATCH 0/7] mm: defer address-space teardown of large exiting processes to a kthread Aditya Sharma
2026-07-19 18:54 ` [RFC PATCH 1/7] mm: add CONFIG_ASYNC_MM_TEARDOWN scaffolding for off-CPU exit teardown Aditya Sharma
2026-07-19 18:54 ` [RFC PATCH 2/7] mm: dispatch __mmput() to an mm_reaper kthread via llist Aditya Sharma
2026-07-19 18:54 ` [RFC PATCH 3/7] mm/oom_kill: mark an OOM victim's mm with MMF_OOM_TARGETED Aditya Sharma
2026-07-19 18:54 ` [RFC PATCH 4/7] mm: gate async teardown on RSS with pending-pages backpressure Aditya Sharma
2026-07-19 18:54 ` [RFC PATCH 5/7] mm: add runtime toggle and sysctls for async teardown Aditya Sharma
2026-07-19 18:54 ` [RFC PATCH 6/7] mm: add tracepoints and vmstat counters " Aditya Sharma
2026-07-19 18:54 ` [RFC PATCH 7/7] exit: route exit_mm()'s final mmput() through mmput_exit() Aditya Sharma
2026-07-19 22:28 ` [RFC PATCH 0/7] mm: defer address-space teardown of large exiting processes to a kthread Liam R . Howlett
2026-07-20 18:38 ` Aditya Sharma
2026-07-20 8:13 ` David Hildenbrand (Arm) [this message]
2026-07-20 18:30 ` Aditya Sharma
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=d1180a70-f4b4-4c22-9ce5-881cb0e2370d@kernel.org \
--to=david@kernel.org \
--cc=adi.sharma@zohomail.in \
--cc=akpm@linux-foundation.org \
--cc=bsegall@google.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=imbrenda@linux.ibm.com \
--cc=juri.lelli@redhat.com \
--cc=kees@kernel.org \
--cc=kprateek.nayak@amd.com \
--cc=liam@infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mgorman@suse.de \
--cc=mhiramat@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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