On Wed, Jul 21, 2021 at 06:52:05PM +0100, Matthew Wilcox wrote: > Oh ... except for swap. For NFS only, it calls ->readpage, so it really > wants ->readpage to be async so it can kick off multiple pages and > then wait for the one it actually needs. That gets into a conversation > about how much we really care about swap-over-NFS, whether swap should > be using ->readpage or ->direct_IO, and whether swap should use the > file readahead code or its own virtual address based readahead code. > Most of those discussions are outside my area of expertise. It really should be using direct I/O. I think one issue back in the day was the odd locking requirements for swap, but that's something we could overcome.