On Tue, Jun 18, 2024 at 5:52 PM Christoph Hellwig <hch@xxxxxx> wrote: > > On Mon, Jun 17, 2024 at 08:02:47PM +1200, Barry Song wrote: > > I did everything the same as above, > > but always got failure at the last step to swapon: > > /mnt/test # swapon swapfile > > swapon: /mnt/test/swapfile: swapon failed: Invalid argument > > You are probably missing > > CONFIG_NFS_SWAP=y > > in your .config. Yes, that was exactly what I missed. I then figured it out, reproduced the issue, and discovered that the root cause was unrelated to large folios. It was actually due to a batched bio plugging optimization from 2022. You can find the new patch here: https://lore.kernel.org/linux-mm/20240617220135.43563-1-21cnbao@xxxxxxxxx/ >