]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: perform async writes to SWP_FS_OPS swap-space using ->swap_rw
authorNeilBrown <neilb@suse.de>
Thu, 14 Apr 2022 06:07:03 +0000 (23:07 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:07:03 +0000 (23:07 -0700)
commit78a0119b002a3b0a567624c40d22bbcc34de9123
treeab008ff5d6a3f8faaaaf757b3bbc2515a4fd586e
parentb2898aca08500ce424ee2a07ad00e4470b246ac7
mm: perform async writes to SWP_FS_OPS swap-space using ->swap_rw

This patch switches swap-out to SWP_FS_OPS swap-spaces to use ->swap_rw
and makes the writes asynchronous, like they are for other swap spaces.

To make it async we need to allocate the kiocb struct from a mempool.
This may block, but won't block as long as waiting for the write to
complete.  At most it will wait for some previous swap IO to complete.

Link: https://lkml.kernel.org/r/164859778126.29473.12399585304843922231.stgit@noble.brown
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_io.c