This change disables swap vma readahead. This is because swap_ra_info() updates vma->swap_readahead_info, which is not feasible when operating on pseudo-vmas. This is a crude temporary solution. It may be possible to use a per-mm swap_readahead_info instead, or if not, to explicitly fetch the vma of record when updating the swap readahead statistics. Signed-off-by: Michel Lespinasse <walken@xxxxxxxxxx> --- mm/swap_state.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git mm/swap_state.c mm/swap_state.c index 8e7ce9a9bc5e..c9cdfd9c785e 100644 --- mm/swap_state.c +++ mm/swap_state.c @@ -298,6 +298,12 @@ void free_pages_and_swap_cache(struct page **pages, int nr) static inline bool swap_use_vma_readahead(void) { + /* + * vma readahead overwrites vma->swap_readahead_info, + * which requires some form of vma locking... + */ + return false; + return READ_ONCE(enable_vma_readahead) && !atomic_read(&nr_rotate_swap); } -- 2.25.0.341.g760bfbb309-goog