ANDROID: retry page allocation from buddy on lock contention

spin_trylock may fail due to a parallel drain in rmqueue_pcplist.
In the case, it should retry to allocate with buddy.
It matches with upstream policy.

Fixes: 433445e9a1 ("ANDROID: mm: add cma pcp list")
Change-Id: I07367888d7ede38e09f9d882fc2485baa175fe64
Signed-off-by: Minchan Kim <minchan@google.com>
This commit is contained in:
Minchan Kim
2023-05-17 09:40:15 -07:00
committed by Treehugger Robot
parent 0ef5d2caad
commit 718da042d1

View File

@@ -3915,7 +3915,8 @@ struct page *rmqueue(struct zone *preferred_zone,
if (likely(pcp_allowed_order(order))) {
page = rmqueue_pcplist(preferred_zone, zone, order,
migratetype, alloc_flags);
goto out;
if (likely(page))
goto out;
}
page = rmqueue_buddy(preferred_zone, zone, order, alloc_flags,