[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YcGRh+crvndawbT3@infradead.org>
Date: Tue, 21 Dec 2021 00:34:15 -0800
From: Christoph Hellwig <hch@...radead.org>
To: NeilBrown <neilb@...e.de>
Cc: Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Chuck Lever <chuck.lever@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>,
Christoph Hellwig <hch@...radead.org>,
David Howells <dhowells@...hat.com>, linux-nfs@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/18] Structural cleanup for filesystem-based swap
On Fri, Dec 17, 2021 at 10:48:22AM +1100, NeilBrown wrote:
> Linux primarily uses IO to block devices for swap, but can send the IO
> requests to a filesystem. This has only ever worked for NFS, and that
> hasn't worked for a while due to a lack of testing. This seems like a
> good time for some tidy-up before restoring swap-over-NFS functionality.
The changes look good to me, but I think this needs to be split into
separate, self-contained patches.
>
> This patch:
Patch 1:
> - updates the documentation (both copies!) for swap_activate which
> is woefully out-of-date
Patch 2:
> - drops the call to the filesystem for ->set_page_dirty(). These
> pages do not belong to the filesystem, and it has no interest
> in the dirty status.
Patch 3:
> - move the responsibility for setting SWP_FS_OPS to ->swap_activate()
> and also requires it to always call add_swap_extent(). This makes
> it much easier to find filesystems that require SWP_FS_OPS.
Patch 4:
> - introduces a new address_space operation "swap_rw" for swap IO.
> The code currently used ->readpage for reads and ->direct_IO for
> writes. The former imposes a limit of one-page-at-a-time, the
> later means that direct writes and swap writes are encouraged to
> use the same path. While similar, swap can often be simpler as
> it can assume that no allocation is needed, and coherence with the
> page cache is irrelevant.
Powered by blists - more mailing lists