mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Virtual Swap Sync
@ 2026-11-05 21:06 Nhat Pham
  2026-11-06 12:55 ` David Hildenbrand (Arm)
  2026-11-22 15:31 ` Nhat Pham
  0 siblings, 2 replies; 4+ messages in thread
From: Nhat Pham @ 2026-11-05 21:06 UTC (permalink / raw)
  To: David Hildenbrand (Arm),
	Johannes Weiner, Chris Li, Baoquan He, Kairui Song, Michal Hocko,
	Roman Gushchin, Shakeel Butt, Muchun Song, Kemeng Shi,
	Barry Song, YoungJun Park, Chengming Zhou,
	Lorenzo Stoakes (Oracle), Liam R. Howlett, Vlastimil Babka (SUSE),
	Mike Rapoport, Suren Baghdasaryan,
	Qi Zheng, Axel Rasmussen, Yuanchu Xie, Gregory Price,
	Wenchao Hao, Jonathan Corbet, Hugh Dickins, Baolin Wang,
	Tejun Heo, Michal Koutný,
	Shuah Khan, Kunwu Chan, Meta kernel team,
	Linux Memory Management List, Linux Kernel Mailing List,
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG),
	Andrew Morton, Joshua Hahn, Rik van Riel, Wei Xu, Yosry Ahmed

Hi folks,

Sorry for the delay in scheduling. I also figured it was not a good
time with all the merge activity + the big list of issues that needs
urgent attention :)

Since no one responded to the last email, I took the liberty to do
some timezone math and create the meeting myself :) How does this
sound?

Thursday Nov 12, 2026 ⋅ 5pm - 6pm (Pacific Time (Canada))

which translates to:

Vancouver: Thursday November 12, 5PM PT
US west coast: Thursday November 12 4:00pm PST
US east coast: Thursday November 12 7:00pm EST
Europe: 1:00am Friday November 13 CET
Beijing: 8:00am Friday November 13 CST

Folks, can you double check the invitation, and please let me know if
I missed you in the invite :)

Best,
Nhat

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Virtual Swap Sync
  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
  1 sibling, 0 replies; 4+ messages in thread
From: David Hildenbrand (Arm) @ 2026-11-06 12:55 UTC (permalink / raw)
  To: Nhat Pham, Johannes Weiner, Chris Li, Baoquan He, Kairui Song,
	Michal Hocko, Roman Gushchin, Shakeel Butt, Muchun Song,
	Kemeng Shi, Barry Song, YoungJun Park, Chengming Zhou,
	Lorenzo Stoakes (Oracle), Liam R. Howlett, Vlastimil Babka (SUSE),
	Mike Rapoport, Suren Baghdasaryan,
	Qi Zheng, Axel Rasmussen, Yuanchu Xie, Gregory Price,
	Wenchao Hao, Jonathan Corbet, Hugh Dickins, Baolin Wang,
	Tejun Heo, Michal Koutný,
	Shuah Khan, Kunwu Chan, Meta kernel team,
	Linux Memory Management List, Linux Kernel Mailing List,
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG),
	Andrew Morton, Joshua Hahn, Rik van Riel, Wei Xu, Yosry Ahmed

On 11/5/26 22:06, Nhat Pham wrote:
> Hi folks,
> 

Hi,

> Sorry for the delay in scheduling. I also figured it was not a good
> time with all the merge activity + the big list of issues that needs
> urgent attention :)

yeah ... thanks for taking care of this.

> 
> Since no one responded to the last email, I took the liberty to do
> some timezone math and create the meeting myself :) How does this
> sound?

I'll try to be there, no promises lol


-- 
Cheers,

David

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Virtual Swap Sync
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Nhat Pham @ 2026-11-22 15:31 UTC (permalink / raw)
  To: David Hildenbrand (Arm),
	Johannes Weiner, Chris Li, Baoquan He, Kairui Song, Michal Hocko,
	Roman Gushchin, Shakeel Butt, Muchun Song, Kemeng Shi,
	Barry Song, YoungJun Park, Chengming Zhou,
	Lorenzo Stoakes (Oracle), Liam R. Howlett, Vlastimil Babka (SUSE),
	Mike Rapoport, Suren Baghdasaryan,
	Qi Zheng, Axel Rasmussen, Yuanchu Xie, Gregory Price,
	Wenchao Hao, Jonathan Corbet, Hugh Dickins, Baolin Wang,
	Tejun Heo, Michal Koutný,
	Shuah Khan, Kunwu Chan, Meta kernel team,
	Linux Memory Management List, Linux Kernel Mailing List,
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG),
	Andrew Morton, Joshua Hahn, Rik van Riel, Wei Xu, Yosry Ahmed

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.

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Virtual Swap Sync
  2026-11-22 15:31 ` Nhat Pham
@ 2026-11-26  6:03   ` Baoquan He
  0 siblings, 0 replies; 4+ messages in thread
From: Baoquan He @ 2026-11-26  6:03 UTC (permalink / raw)
  To: Nhat Pham
  Cc: David Hildenbrand (Arm),
	Johannes Weiner, Chris Li, Kairui Song, Michal Hocko,
	Roman Gushchin, Shakeel Butt, Muchun Song, Kemeng Shi,
	Barry Song, YoungJun Park, Chengming Zhou,
	Lorenzo Stoakes (Oracle), Liam R. Howlett, Vlastimil Babka (SUSE),
	Mike Rapoport, Suren Baghdasaryan,
	Qi Zheng, Axel Rasmussen, Yuanchu Xie, Gregory Price,
	Wenchao Hao, Jonathan Corbet, Hugh Dickins, Baolin Wang,
	Tejun Heo, Michal Koutný,
	Shuah Khan, Kunwu Chan, Meta kernel team,
	Linux Memory Management List, Linux Kernel Mailing List,
	open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG),
	Andrew Morton, Joshua Hahn, Rik van Riel, Wei Xu, Yosry Ahmed

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-26  6:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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®