]> Git Repo - linux.git/commit
mm: submit multipage write for SWP_FS_OPS swap-space
authorNeilBrown <[email protected]>
Tue, 10 May 2022 01:20:49 +0000 (18:20 -0700)
committerakpm <[email protected]>
Tue, 10 May 2022 01:20:49 +0000 (18:20 -0700)
commit2282679fb20bf036a714ed49fadd0230c278a203
tree9d800e63a82d3405fd1897ab4b8e3873d7ebb561
parent5169b844b7dd5934cd4f22ab66de0cc669abf0b0
mm: submit multipage write for SWP_FS_OPS swap-space

swap_writepage() is given one page at a time, but may be called repeatedly
in succession.

For block-device swapspace, the blk_plug functionality allows the multiple
pages to be combined together at lower layers.  That cannot be used for
SWP_FS_OPS as blk_plug may not exist - it is only active when
CONFIG_BLOCK=y.  Consequently all swap reads over NFS are single page
reads.

With this patch we pass a pointer-to-pointer via the wbc.  swap_writepage
can store state between calls - much like the pointer passed explicitly to
swap_readpage.  After calling swap_writepage() some number of times, the
state will be passed to swap_write_unplug() which can submit the combined
request.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: NeilBrown <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Tested-by: David Howells <[email protected]>
Tested-by: Geert Uytterhoeven <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Miaohe Lin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
include/linux/writeback.h
mm/page_io.c
mm/swap.h
mm/vmscan.c
This page took 0.05889 seconds and 4 git commands to generate.