mm, slaub: Add __GFP_ATOMIC to the GFP reclaim mask
Subsystems (2)
PATCH 1/1 mm, slaub: 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.
--- mm/internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
mm/internal.h +2 -1
@@ -24,7 +24,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))
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Mel Gorman
Commit
d0164adc89f6("mm,page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd") modified__GFP_WAITto explicitly identify the difference between atomic callers and those that were unwilling to sleep. Later the definition was removed entirely.The
GFP_RECLAIM_MASKis the set of flags that affect watermark checking and reclaim behaviour but__GFP_ATOMICwas never added. Without it, atomic users of the slab allocator strip the__GFP_ATOMICflag and cannot access the page allocator atomic reserves. This patch addresses the problem.
Quoted 6 lines
The user-visible impact depends on the workload but potentially atomic allocations unnecessarily fail without this path.
Cc <[email protected]> # 4.4+Reported-by Marcin Wojtas <[email protected]>Signed-off-by Mel Gorman <[email protected]>
Quoted 10 lines
--- mm/internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)mm/internal.h +0
-0
mm/internal.h line 31
Quoted 9 lines
mm/internal.h +2
-1@@ -24,7 +24,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))
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · Mel Gorman
Commit
d0164adc89f6("mm,page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd") modified__GFP_WAITto explicitly identify the difference between atomic callers and those that were unwilling to sleep. Later the definition was removed entirely.The
GFP_RECLAIM_MASKis the set of flags that affect watermark checking and reclaim behaviour but__GFP_ATOMICwas never added. Without it, atomic users of the slab allocator strip the__GFP_ATOMICflag and cannot access the page allocator atomic reserves. This patch addresses the problem.
Quoted 6 lines
The user-visible impact depends on the workload but potentially atomic allocations unnecessarily fail without this path.
Cc <[email protected]> # 4.4+Reported-by Marcin Wojtas <[email protected]>Signed-off-by Mel Gorman <[email protected]>
Quoted 24 lines
--- mm/internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)mm/internal.h +2
-2@@ -24,7 +24,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)) --To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>