lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e90ccb0a3fd20e9b2d6e2cf19db9590394f7edc.camel@surriel.com>
Date: Wed, 26 Nov 2025 16:58:56 -0500
From: Rik van Riel <riel@...riel.com>
To: Chris Li <chrisl@...nel.org>, Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Johannes Weiner <hannes@...xchg.org>, Andrew Morton	
 <akpm@...ux-foundation.org>, Kairui Song <kasong@...cent.com>, Kemeng Shi	
 <shikemeng@...weicloud.com>, Nhat Pham <nphamcs@...il.com>, Baoquan He	
 <bhe@...hat.com>, Barry Song <baohua@...nel.org>, Chengming Zhou	
 <chengming.zhou@...ux.dev>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, 	pratmal@...gle.com, sweettea@...gle.com,
 gthelen@...gle.com, weixugc@...gle.com
Subject: Re: [PATCH RFC] mm: ghost swapfile support for zswap

On Tue, 2025-11-25 at 22:50 +0400, Chris Li wrote:
> 
> > - We still cannot do swapoff efficiently as we need to walk the
> > page
> >   tables (and some swap tables) to find and swapin all entries in a
> >   swapfile. Not as important as other things, but worth mentioning.
> 
> That need rmap for swap entries. It It is an independent issue.
> 

Wouldn't rmap for swap entries be more expensive than
simply always having indirection for swap entries that
are in use?

With indirection, swapoff can just move pages from
the being-swapoffed device into the swap cache, and
if needed the memory can then be moved to another
swap device, without ever needing to find the page
tables.

This sounds like an uncommon scenario, but it is
functionally identical to what is done to pages
during zswap writeback, where the page table entries
stay unchanged, and the swap page is simply moved
to another backend location.

Why implement two things, when we can have one
thing that does both, with no extra complexity
over what zswap writeback needs?

-- 
All Rights Reversed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ