Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.com>2016-06-10 11:56:16 +0100
committerMel Gorman <mgorman@suse.com>2016-06-10 11:56:16 +0100
commitd9f388f467b0ac6a1b672df1835018d81612cca1 (patch)
tree867e424f5490436b306f7ba1f5e787b956ca679e
parentc55f6f392a4a5c2894f59193b08630678780c84d (diff)
mm, slaub: Add __GFP_ATOMIC to the GFP reclaim mask (bnc#971975
VM performance -- page allocator).
-rw-r--r--patches.suse/mm-slaub-Add-__GFP_ATOMIC-to-the-GFP-reclaim-mask.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.suse/mm-slaub-Add-__GFP_ATOMIC-to-the-GFP-reclaim-mask.patch b/patches.suse/mm-slaub-Add-__GFP_ATOMIC-to-the-GFP-reclaim-mask.patch
new file mode 100644
index 0000000000..bcec79e959
--- /dev/null
+++ b/patches.suse/mm-slaub-Add-__GFP_ATOMIC-to-the-GFP-reclaim-mask.patch
@@ -0,0 +1,42 @@
+From: Mel Gorman <mgorman@suse.de>
+Date: Fri, 10 Jun 2016 10:29:47 +0100
+Subject: [PATCH] mm, slaub: Add __GFP_ATOMIC to the GFP reclaim mask
+
+References: bnc#971975 VM performance -- page allocator
+Patch-mainline: No, should be in 4.7
+
+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@suse.de>
+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 651e52dfa838..caf96779fa42 100644
+--- a/mm/internal.h
++++ b/mm/internal.h
+@@ -23,7 +23,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))
diff --git a/series.conf b/series.conf
index 0f589f2f71..f6af4c3a9d 100644
--- a/series.conf
+++ b/series.conf
@@ -222,6 +222,7 @@
patches.suse/mm-page_alloc-prevent-infinite-loop-in-buffered_rmqueue.patch
patches.suse/mm-page_alloc-reset-zonelist-iterator-after-resetting-fair-zone-allocation-policy.patch
patches.suse/mm-page_alloc-Recalculate-the-preferred-zoneref-if-the-context-can-ignore-memory-policies.patch
+ patches.suse/mm-slaub-Add-__GFP_ATOMIC-to-the-GFP-reclaim-mask.patch
# -stable pending page aging
patches.suse/mm-make-faultaround-produce-old-ptes.patch