diff options
author | Jan Kara <jack@suse.cz> | 2018-12-28 09:39:16 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 21:11:51 +0100 |
commit | 88dbcbb3a4847f5e6dfeae952d3105497700c128 (patch) | |
tree | fece39ef970f6f022e4f010aacbc0b68691a2fae /mm/migrate.c | |
parent | mm: migrate: provide buffer_migrate_page_norefs() (diff) | |
download | linux-88dbcbb3a4847f5e6dfeae952d3105497700c128.tar.xz linux-88dbcbb3a4847f5e6dfeae952d3105497700c128.zip |
blkdev: avoid migration stalls for blkdev pages
Currently, block device pages don't provide a ->migratepage callback and
thus fallback_migrate_page() is used for them. This handler cannot deal
with dirty pages in async mode and also with the case a buffer head is in
the LRU buffer head cache (as it has elevated b_count). Thus such page
can block memory offlining.
Fix the problem by using buffer_migrate_page_norefs() for migrating block
device pages. That function takes care of dropping bh LRU in case
migration would fail due to elevated buffer refcount to avoid stalls and
can also migrate dirty pages without writing them.
Link: http://lkml.kernel.org/r/20181211172143.7358-6-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/migrate.c')
0 files changed, 0 insertions, 0 deletions