From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Hirotaka Yamagata <hiro@pisnp.net>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-api@vger.kernel.org, "Liam R. Howlett" <liam@infradead.org>,
Lorenzo Stoakes <ljs@kernel.org>, Chris Li <chrisl@kernel.org>,
Kairui Song <kasong@tencent.com>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
cgroups@vger.kernel.org, John Stultz <jstultz@google.com>,
Minchan Kim <minchan@kernel.org>,
Alexandre Marciano Gimenez <raging@google.com>,
Tatsuyuki Ishi <ishitatsuyuki@google.com>
Subject: Re: [RFC PATCH v1 0/4] mm: port MADV_VOLATILE and MADV_NONVOLATILE to v7.3-rc1
Date: Mon, 30 Nov 2026 11:39:45 +0100 [thread overview]
Message-ID: <fe03a116-276d-4871-9a0e-fa4e47f4ff53@kernel.org> (raw)
In-Reply-To: <20261130083407.2669584-1-hiro@pisnp.net>
On 11/30/26 09:34, Hirotaka Yamagata wrote:
Hi,
> This RFC series revives and modernizes the volatile ranges patchset
> originally proposed by John Stultz and Minchan Kim [1].
>
> Volatile ranges allow userspace caches holding regenerable data (such as
> decoded image bitmaps or other private caches) to mark private anonymous
> memory as safe for the kernel to discard under memory pressure,
> bypassing swap. Such ranges are marked via madvise(MADV_VOLATILE).
> Before reusing the buffer, userspace calls madvise(MADV_NONVOLATILE),
> which unmarks the range and returns 1 if any pages in the range were
> purged while volatile (or 0 if all pages remained intact).
We have MAP_DROPPABLE nowadays, I don't think we want more of that.
>
> Unlike MADV_FREE, which silently zero-fills dropped pages on re-access,
> calling MADV_NONVOLATILE before reuse gives userspace deterministic
> notification of whether cached data was lost without having to touch
> every page.
We do have userfaultfd missing faults + rwp (read-write-protection). Can't we
build something based on that instead?
We currently disable uffd with MAP_DROPPABLE, but maybe there could be a use
case for it. Of course, you can also build it based on MADV_FREE instead.
--
Cheers,
David
prev parent reply other threads:[~2026-11-30 10:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 8:34 Hirotaka Yamagata
2026-11-30 8:34 ` [RFC PATCH v1 1/4] mm: introduce VM_VOLATILE and MADV_VOLATILE/MADV_NONVOLATILE VMA handling Hirotaka Yamagata
2026-11-30 8:34 ` [RFC PATCH v1 2/4] mm: add PTE_MARKER_PURGED and TTU_PURGE for purged volatile pages Hirotaka Yamagata
2026-11-30 8:34 ` [RFC PATCH v1 3/4] mm/volatile: purge volatile anonymous folios during reclaim Hirotaka Yamagata
2026-11-30 8:34 ` [RFC PATCH v1 4/4] mm/volatile: add PGPURGE vmstat counter and purge tracepoint Hirotaka Yamagata
2026-11-30 10:39 ` David Hildenbrand (Arm) [this message]
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=fe03a116-276d-4871-9a0e-fa4e47f4ff53@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=cgroups@vger.kernel.org \
--cc=chrisl@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hiro@pisnp.net \
--cc=ishitatsuyuki@google.com \
--cc=jstultz@google.com \
--cc=kasong@tencent.com \
--cc=liam@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@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=mhiramat@kernel.org \
--cc=mhocko@kernel.org \
--cc=minchan@kernel.org \
--cc=raging@google.com \
--cc=roman.gushchin@linux.dev \
--cc=rostedt@goodmis.org \
--cc=shakeel.butt@linux.dev \
/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
all inboxes | Powered by JetHome®