Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1419152 > unrolled thread
| Started by | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| First post | 2016-06-10 11:40 +0200 |
| Last post | 2016-06-10 12:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mm, slaub: Add __GFP_ATOMIC to the GFP reclaim mask Mel Gorman <mgorman@techsingularity.net> - 2016-06-10 11:40 +0200
Re: [PATCH] mm, slaub: Add __GFP_ATOMIC to the GFP reclaim mask Vlastimil Babka <vbabka@suse.cz> - 2016-06-10 12:20 +0200
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Date | 2016-06-10 11:40 +0200 |
| Subject | [PATCH] mm, slaub: Add __GFP_ATOMIC to the GFP reclaim mask |
| Message-ID | <rIr50-2Pg-17@gated-at.bofh.it> |
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.
Cc: <stable@vger.kernel.org> # 4.4+
Reported-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
mm/internal.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 @@
*/
#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))
[toc] | [next] | [standalone]
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Date | 2016-06-10 12:20 +0200 |
| Message-ID | <rIrHJ-3il-63@gated-at.bofh.it> |
| In reply to | #1419152 |
On 06/10/2016 11:38 AM, Mel Gorman wrote:
> 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.
>
> Cc: <stable@vger.kernel.org> # 4.4+
> Reported-by: Marcin Wojtas <mw@semihalf.com>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/internal.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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 @@
> */
> #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))
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web