mm: Remove swap BIO paths and only use DIO paths
Delete the BIO-generating swap read/write paths and always use ->swap_rw().
This puts the mapping layer in the filesystem.
[!] ALSO: Add a compile-time knob to disable swap by asynchronous DIO, only
using synchronous DIO. Async DIO doesn't seem to work, with ATA errors
being chucked out by the swap-on-blockdev and swapfile-on-XFS. It also
misbehaves on NFS.
I have tested this with sync DIO on ext4-swapfile, xfs-swapfile, a raw
blockdev and NFS. The first three work; NFS works for a while then grinds to
a halt, chucking out lists of blocked sunrpc operations (I suspect it can't
allocate memory somewhere).
Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: Christoph Hellwig <hch@lst.de>
cc: Jens Axboe <axboe@kernel.dk>
cc: Darrick J. Wong <djwong@kernel.org>
cc: linux-block@vger.kernel.org
cc: linux-xfs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
2 files changed