Minchan Kim 8cc621d2f4 mm: fs: invalidate BH LRU during page migration
Pages containing buffer_heads that are in one of the per-CPU buffer_head
LRU caches will be pinned and thus cannot be migrated.  This can prevent
CMA allocations from succeeding, which are often used on platforms with
co-processors (such as a DSP) that can only use physically contiguous
memory.  It can also prevent memory hot-unplugging from succeeding,
which involves migrating at least MIN_MEMORY_BLOCK_SIZE bytes of memory,
which ranges from 8 MiB to 1 GiB based on the architecture in use.

Correspondingly, invalidate the BH LRU caches before a migration starts
and stop any buffer_head from being cached in the LRU caches, until
migration has finished.

Link: https://lkml.kernel.org/r/20210319175127.886124-3-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reported-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Reported-by: Laura Abbott <labbott@kernel.org>
Tested-by: Oliver Sang <oliver.sang@intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: John Dias <joaodias@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-05-05 11:27:24 -07:00
..
2021-01-24 14:27:20 +01:00
2021-02-23 13:39:45 -08:00
2021-04-27 13:27:39 -07:00
2021-01-24 14:27:20 +01:00
2021-03-30 16:54:49 -07:00
2021-01-24 14:27:20 +01:00
2021-04-12 15:04:29 +02:00
2021-04-12 15:04:29 +02:00
2021-04-10 03:20:19 +08:00
\n
2021-04-29 11:06:13 -07:00
\n
2021-04-29 11:06:13 -07:00
2021-04-27 13:08:12 -07:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:20 +01:00
2021-04-12 15:04:29 +02:00
2021-01-24 14:27:20 +01:00
2021-03-30 16:54:49 -07:00
2021-04-12 15:04:29 +02:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:20 +01:00
2021-04-26 23:23:41 +01:00
2021-04-27 13:42:11 -07:00
2021-04-12 15:04:30 +02:00
2021-04-30 11:20:35 -07:00
2021-01-24 14:27:20 +01:00
2021-04-27 18:09:44 -07:00
2021-02-24 13:38:26 -08:00
\n
2021-04-29 10:51:29 -07:00
2021-01-24 14:27:20 +01:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:20 +01:00
2020-09-10 14:03:31 -07:00
2021-04-29 10:43:51 -07:00
\n
2021-04-29 11:06:13 -07:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:20 +01:00
2021-05-05 11:27:19 -07:00
2021-02-24 13:38:26 -08:00
2021-02-24 13:38:26 -08:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:19 +01:00
2021-02-23 13:39:45 -08:00
2021-04-28 14:56:09 -07:00
2021-04-12 15:04:23 +02:00
2021-03-23 11:20:25 +01:00
2021-04-26 13:24:39 -07:00
2021-04-27 12:49:42 -07:00
2021-02-23 13:39:45 -08:00
2021-02-24 13:38:26 -08:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:19 +01:00
2021-02-21 11:02:48 -08:00
2021-01-24 14:27:20 +01:00
2021-02-13 17:17:53 +01:00
2021-01-24 14:27:18 +01:00