Commit 9cb760bc authored by Minchan Kim's avatar Minchan Kim Committed by Richard Chang
Browse files

FROMLIST: mm: failfast mode with __GFP_NORETRY in alloc_contig_range

Contiguous memory allocation can be stalled due to waiting
on page writeback and/or page lock which causes unpredictable
delay. It's a unavoidable cost for the requestor to get *big*
contiguous memory but it's expensive for *small* contiguous
memory(e.g., order-4) because caller could retry the request
in different range where would have easy migratable pages
without stalling.

This patch introduce __GFP_NORETRY as compaction gfp_mask in
alloc_contig_range so it will fail fast without blocking
when it encounters pages needed waiting.

Bug: 170340257
Bug: 120293424
Link: https://lore.kernel.org/linux-mm/YAnM5PbNJZlk%2F%2FiX@google.com/T/#m1362218ebb69e6e10c20d9361008b079745c4e6f


Signed-off-by: default avatarMinchan Kim <minchan@kernel.org>
Signed-off-by: default avatarMinchan Kim <minchan@google.com>
Change-Id: I42ba8dd5aeb065d936978ab205e4baf84bf9a321
Signed-off-by: default avatarRichard Chang <richardycc@google.com>
(cherry picked from commit 20512940)
parent eebff8ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment