diff options
author | Hugh Dickins <hughd@google.com> | 2019-04-18 17:50:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-19 09:46:04 -0700 |
commit | 64165b1affc5bc16231ac971e66aae7d68d57f2c (patch) | |
tree | f076121056eafaf3790cbc23cc0be88b4bc85d79 /virt/Makefile | |
parent | dd862deb151aad2548e72b077a82ad3aa91b715f (diff) | |
download | linux-64165b1affc5bc16231ac971e66aae7d68d57f2c.tar.gz linux-64165b1affc5bc16231ac971e66aae7d68d57f2c.tar.bz2 linux-64165b1affc5bc16231ac971e66aae7d68d57f2c.zip |
mm: swapoff: take notice of completion sooner
The old try_to_unuse() implementation was driven by find_next_to_unuse(),
which terminated as soon as all the swap had been freed.
Add inuse_pages checks now (alongside signal_pending()) to stop scanning
mms and swap_map once finished.
The same ought to be done in shmem_unuse() too, but never was before,
and needs a different interface: so leave it as is for now.
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1904081258200.1523@eggly.anvils
Fixes: b56a2d8af914 ("mm: rid swapoff of quadratic complexity")
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Kelley Nielsen <kelleynnn@gmail.com>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Rik van Riel <riel@surriel.com>
Cc: Vineeth Pillai <vpillai@digitalocean.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'virt/Makefile')
0 files changed, 0 insertions, 0 deletions