Thread (17 messages) flat view 17 messages, 4 authors, 2021-02-18

Re: [RFC 1/2] mm: disable LRU pagevec during the migration temporarily

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-02-16 18:24:13
Also in: linux-fsdevel, lkml

On Tue, Feb 16, 2021 at 09:03:47AM -0800, Minchan Kim wrote:
LRU pagevec holds refcount of pages until the pagevec are drained.
It could prevent migration since the refcount of the page is greater
than the expection in migration logic. To mitigate the issue,
callers of migrate_pages drains LRU pagevec via migrate_prep or
lru_add_drain_all before migrate_pages call.

However, it's not enough because pages coming into pagevec after the
draining call still could stay at the pagevec so it could keep
preventing page migration. Since some callers of migrate_pages have
retrial logic with LRU draining, the page would migrate at next trail
but it is still fragile in that it doesn't close the fundamental race
between upcoming LRU pages into pagvec and migration so the migration
failure could cause contiguous memory allocation failure in the end.
Have you been able to gather any numbers on this?  eg does migration
now succeed 5% more often?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help