summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@gmail.com>2017-01-31 16:40:57 +0000
committerPeter Robinson <pbrobinson@gmail.com>2017-01-31 16:41:38 +0000
commitf8b849e899220edadb32736bef3fe3a2ff0b89b5 (patch)
tree20267362be076638a9535b3164a43467b439164c
parent36888985327cc4d9987a3915d19f85b059567568 (diff)
downloadkernel-f8b849e899220edadb32736bef3fe3a2ff0b89b5.tar.gz
kernel-f8b849e899220edadb32736bef3fe3a2ff0b89b5.tar.xz
kernel-f8b849e899220edadb32736bef3fe3a2ff0b89b5.zip
Fix CMA compaction regression (Raspberry Pi and others)
-rw-r--r--kernel.spec5
-rw-r--r--mm-alloc_contig-re-allow-CMA-to-compact-FS-pages.patch42
2 files changed, 47 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 87f1daa0a..6b2a96efc 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -529,6 +529,8 @@ Patch432: bcm283x-fixes.patch
# http://www.spinics.net/lists/linux-mmc/msg41151.html
Patch433: bcm283x-mmc-imp-speed.patch
+Patch434: mm-alloc_contig-re-allow-CMA-to-compact-FS-pages.patch
+
Patch440: AllWinner-net-emac.patch
Patch442: ARM-Drop-fixed-200-Hz-timer-requirement-from-Samsung-platforms.patch
@@ -2166,6 +2168,9 @@ fi
#
#
%changelog
+* Tue Jan 31 2017 Peter Robinson <pbrobinson@fedoraproject.org>
+- Fix CMA compaction regression (Raspberry Pi and others)
+
* Thu Jan 26 2017 Peter Robinson <pbrobinson@fedoraproject.org>
- arm64: dma-mapping: Fix dma_mapping_error() when bypassing SWIOTLB
diff --git a/mm-alloc_contig-re-allow-CMA-to-compact-FS-pages.patch b/mm-alloc_contig-re-allow-CMA-to-compact-FS-pages.patch
new file mode 100644
index 000000000..0e542dc4f
--- /dev/null
+++ b/mm-alloc_contig-re-allow-CMA-to-compact-FS-pages.patch
@@ -0,0 +1,42 @@
+From 424f6c4818bbf1b8ccf58aa012ecc19c0bb9b446 Mon Sep 17 00:00:00 2001
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Tue, 24 Jan 2017 15:18:05 -0800
+Subject: [PATCH 179/273] mm: alloc_contig: re-allow CMA to compact FS pages
+
+Commit 73e64c51afc5 ("mm, compaction: allow compaction for GFP_NOFS
+requests") changed compation to skip FS pages if not explicitly allowed
+to touch them, but missed to update the CMA compact_control.
+
+This leads to a very high isolation failure rate, crippling performance
+of CMA even on a lightly loaded system. Re-allow CMA to compact FS
+pages by setting the correct GFP flags, restoring CMA behavior and
+performance to the kernel 4.9 level.
+
+Fixes: 73e64c51afc5 (mm, compaction: allow compaction for GFP_NOFS requests)
+Link: http://lkml.kernel.org/r/20170113115155.24335-1-l.stach@pengutronix.de
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+Acked-by: Michal Hocko <mhocko@suse.com>
+Acked-by: Vlastimil Babka <vbabka@suse.cz>
+Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
+Cc: Mel Gorman <mgorman@techsingularity.net>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+---
+ mm/page_alloc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index d604d25..41d5e2e 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -7248,6 +7248,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
+ .zone = page_zone(pfn_to_page(start)),
+ .mode = MIGRATE_SYNC,
+ .ignore_skip_hint = true,
++ .gfp_mask = GFP_KERNEL,
+ };
+ INIT_LIST_HEAD(&cc.migratepages);
+
+--
+2.9.3
+