From: Baoquan He <baoquan.he@linux.dev>
To: Nhat Pham <nphamcs@gmail.com>
Cc: "David Hildenbrand (Arm)" <david@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Chris Li" <chrisl@kernel.org>, "Kairui Song" <ryncsn@gmail.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Roman Gushchin" <roman.gushchin@linux.dev>,
"Shakeel Butt" <shakeel.butt@linux.dev>,
"Muchun Song" <muchun.song@linux.dev>,
"Kemeng Shi" <shikemeng@huaweicloud.com>,
"Barry Song" <baohua@kernel.org>,
"YoungJun Park" <youngjun.park@lge.com>,
"Chengming Zhou" <chengming.zhou@linux.dev>,
"Lorenzo Stoakes (Oracle)" <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
"Mike Rapoport" <rppt@kernel.org>,
"Suren Baghdasaryan" <surenb@google.com>,
"Qi Zheng" <qi.zheng@linux.dev>,
"Axel Rasmussen" <axelrasmussen@google.com>,
"Yuanchu Xie" <yuanchu@google.com>,
"Gregory Price" <gourry@gourry.net>,
"Wenchao Hao" <haowenchao22@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Hugh Dickins" <hughd@google.com>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Tejun Heo" <tj@kernel.org>, "Michal Koutný" <mkoutny@suse.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Kunwu Chan" <kunwu.chan@linux.dev>,
"Meta kernel team" <kernel-team@meta.com>,
"Linux Memory Management List" <linux-mm@kvack.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)"
<cgroups@vger.kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Joshua Hahn" <joshua.hahnjy@gmail.com>,
"Rik van Riel" <riel@surriel.com>, "Wei Xu" <weixugc@google.com>,
"Yosry Ahmed" <yosry@kernel.org>
Subject: Re: Virtual Swap Sync
Date: Thu, 26 Nov 2026 14:03:19 +0800 [thread overview]
Message-ID: <awfLp4H_pyefSM5v@fedora> (raw)
In-Reply-To: <CAKEwX=O2McF-gyqJT2a8R5q79+QABCPjULrcjC2CC0v8TnXxJw@mail.gmail.com>
On 11/22/26 at 08:31am, Nhat Pham wrote:
> On Thu, Nov 5, 2026 at 2:06 PM Nhat Pham <nphamcs@gmail.com> wrote:
> >
> > Hi folks,
> >
>
> Hi folks - thanks everyone for attending. :)
>
> I summarized the points we discussed below - please let me know if I
> missed anything or misunderstood a point.
>
> * Control interface: Google is interested in a knob to cease zswapping
> (which already exists and will still work in vswap world). Kairui has
> a use case for remapping all swapped-out pages.
>
> Vswap currently bypassed when zswap is off; per-cgroup selection could
> be added as concrete use case arises (for e.g migration/compaction).
>
> David objected that a virtual swap abstraction should not carry a
> swapoff interface per se. Folks also asked whether making vswap a
> mandatory layer would make the implementation cleaner (Nhat will
> explore this direction and follow up on this).
>
> * Virtual space sizing: We discussed using vm.overcommit_ratio and
> vm.overcommit_memory to limit the host's logical memory footprint. The
> exact sizing formula is still unclear - Nhat will follow up with
> Kairui on whether it is acceptable.
>
> (Kairui, if possible, can you respond here for your exact use case? Do
> you want to limit physical memory usage, or virtual? My understanding
> is you want to gate physical + swap, which would be closer to the
> latter).
>
> * Priority and multiple swapfiles: should not be added for now.
> No good use case for swap priority was identified.
> Multiple swapfiles were used in the past to work around swapfile
> lock contention, but it is unclear whether they are still needed with
> Kairui's new cluster-based allocator. If contention remains a problem,
> we should fix it in the kernel before putting that burden on
> userspace.
>
> * Proposed phase split and charging (from Nhat):
>
> - Phase 1 - initial foundation:
> - Decoupled zswap: Let zswap operate without reserving disk swap
> for every virtual entry.
> - Physical backing and writeback: Keep disk swap available as a
> backend, including when zswap cannot store a page or an entry needs
> writeback.
> - Charging: Retain memsw charging for virtual entries; keep
> virtual-slot usage out of memory.swap.max. Actual physical swap usage
> keeps its resource charging.
> - Usage counter: Expose vswap usage so users can monitor
> virtual-space consumption separately from physical swap usage.
> Essentially this gives you a method to estimate the logical footprint
> (memory.current - swapcached + vswap).
>
> - Subsequent phase(s) - further support and controls:
> - VM_SPARSE: Add VM_SPARSE as an optimization after the
> first-phase foundation.
> - Runtime controls (added as use cases arise):
> - Host-wide runtime disablement knob (and remapping of swapped out data).
> - Per-cgroup vswap control (for e.g, if some cgroups want
> migrations/physical swapfile compaction).
>
> - Orthogonal use cases and concerns:
> - Cgroup-level logical memory limits in cgroupv2 (memsw?) - swap
> developers will follow up with memcg maintainers.
> - Static sizing: Define the host-sizing formula and decide whether
> another interface is needed.
> - Swap tiering for cgroups: Explore backend selection when a
> concrete workload needs it.
Youngjun's swap tier comes from concrete use case of his company, it's
been v11, he presented this in LSF and LPC.
[RFC PATCH v11 0/4] mm/swap: priority-based swap tiers with per-cgroup selection
https://lore.kernel.org/all/20260916183437.2946306-1-youngjun.park@lge.com/T/#u
This is xswap road map I shared with you when we discussed about working
together. I also mentioned swap tier in road map because Swap tier is a
very important feature we swap developers plan to add.
https://lore.kernel.org/all/al8ohWshSSZ64AtT@MiWiFi-R3L-srv/
I thought you had read them.
I don't know why I couldn't join meeting last time, I tried at 8:05am at
my side, kept waiting for people to approve me until 8:30am I was
added. Not sure if you guys also talked about this.
Thanks
Baoquan
>
> Folks, please comment on the summary and proposal.
>
> Let us keep the communication line open and coordinate on the next
> steps. I will schedule something again.
>
> Also taking a step back - once we reach a consensus on vswap, maybe we
> can repurpose this series of meeting for general swap alignment? There
> are other swap/compressed swap developments right now (looking at the
> orthogonal use cases list above for e.g), so maybe we can do this once
> or twice a month. My experience in the past year or so has shown that
> we clearly need better alignment :)
>
> I will reach out to set up another round of meeting. I'm hoping we can
> do it one more time in December, but I understand that holiday season
> is coming :)
>
> For folks in the U.S, I wish you all a merry and festive Thanksgiving.
prev parent reply other threads:[~2026-11-26 6:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 21:06 Virtual Swap Sync Nhat Pham
2026-11-06 12:55 ` David Hildenbrand (Arm)
2026-11-22 15:31 ` Nhat Pham
2026-11-26 6:03 ` Baoquan He [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=awfLp4H_pyefSM5v@fedora \
--to=baoquan.he@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=cgroups@vger.kernel.org \
--cc=chengming.zhou@linux.dev \
--cc=chrisl@kernel.org \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=gourry@gourry.net \
--cc=hannes@cmpxchg.org \
--cc=haowenchao22@gmail.com \
--cc=hughd@google.com \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=kunwu.chan@linux.dev \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=nphamcs@gmail.com \
--cc=qi.zheng@linux.dev \
--cc=riel@surriel.com \
--cc=roman.gushchin@linux.dev \
--cc=rppt@kernel.org \
--cc=ryncsn@gmail.com \
--cc=shakeel.butt@linux.dev \
--cc=shikemeng@huaweicloud.com \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=tj@kernel.org \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=yosry@kernel.org \
--cc=youngjun.park@lge.com \
--cc=yuanchu@google.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