diff options
authorMel Gorman <>2016-06-24 14:49:37 -0700
committerLinus Torvalds <>2016-06-24 17:23:52 -0700
commite838a45f9392a5bd2be1cd3ab0b16ae85857461c (patch)
parent9b75a867cc9ddbafcaf35029358ac500f2635ff3 (diff)
mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask
Commit d0164adc89f6 ("mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd") modified __GFP_WAIT to explicitly identify the difference between atomic callers and those that were unwilling to sleep. Later the definition was removed entirely. The GFP_RECLAIM_MASK is the set of flags that affect watermark checking and reclaim behaviour but __GFP_ATOMIC was never added. Without it, atomic users of the slab allocator strip the __GFP_ATOMIC flag and cannot access the page allocator atomic reserves. This patch addresses the problem. The user-visible impact depends on the workload but potentially atomic allocations unnecessarily fail without this path. Link: Signed-off-by: Mel Gorman <> Reported-by: Marcin Wojtas <> Acked-by: Vlastimil Babka <> Acked-by: Michal Hocko <> Cc: <> [4.4+] Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/internal.h b/mm/internal.h
index a37e5b6f9d25..2524ec880e24 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -24,7 +24,8 @@
/* The GFP flags allowed during early boot */