diff options
author | Mel Gorman <mgorman@techsingularity.net> | 2016-06-24 14:49:37 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-10 11:49:25 +0200 |
commit | 5b3114b2af2fe1cf6d465d594faefaea6c1f328b (patch) | |
tree | 401737be82d10c2c6f5b65559c9daffd6a330ad0 | |
parent | 6b373d53e8b99b7e1d4568914851a21bbd07d3bc (diff) | |
download | linux-stable-5b3114b2af2fe1cf6d465d594faefaea6c1f328b.tar.gz linux-stable-5b3114b2af2fe1cf6d465d594faefaea6c1f328b.tar.bz2 linux-stable-5b3114b2af2fe1cf6d465d594faefaea6c1f328b.zip |
mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask
commit e838a45f9392a5bd2be1cd3ab0b16ae85857461c upstream.
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: http://lkml.kernel.org/r/20160610093832.GK2527@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Reported-by: Marcin Wojtas <mw@semihalf.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | mm/internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/internal.h b/mm/internal.h index 38e24b89e4c4..6979b2bd3227 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -22,7 +22,8 @@ */ #define GFP_RECLAIM_MASK (__GFP_RECLAIM|__GFP_HIGH|__GFP_IO|__GFP_FS|\ __GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\ - __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC) + __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC|\ + __GFP_ATOMIC) /* The GFP flags allowed during early boot */ #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_RECLAIM|__GFP_IO|__GFP_FS)) |