diff options
author | 2022-05-09 18:20:49 -0700 | |
---|---|---|
committer | 2022-05-09 18:20:49 -0700 | |
commit | 5169b844b7dd5934cd4f22ab66de0cc669abf0b0 (patch) | |
tree | 97adf12221bb1191c14dafc9aae6713586060a55 /include/linux/writeback.h | |
parent | doc: update documentation for swap_activate and swap_rw (diff) | |
download | linux-rng-5169b844b7dd5934cd4f22ab66de0cc669abf0b0.tar.xz linux-rng-5169b844b7dd5934cd4f22ab66de0cc669abf0b0.zip |
mm: submit multipage reads for SWP_FS_OPS swap-space
swap_readpage() is given one page at a time, but may be called repeatedly
in succession.
For block-device swap-space, 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 in a pointer-to-pointer when swap_readpage can
store state between calls - much like the effect of blk_plug. After
calling swap_readpage() some number of times, the state will be passed to
swap_read_unplug() which can submit the combined request.
Link: https://lkml.kernel.org/r/164859778127.29473.14059420492644907783.stgit@noble.brown
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: David Howells <dhowells@redhat.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/writeback.h')
0 files changed, 0 insertions, 0 deletions