All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20110510143509.GD4146@suse.de>

diff --git a/a/2.txt b/N1/2.txt
index ce35085..8b13789 100644
--- a/a/2.txt
+++ b/N1/2.txt
@@ -1,32 +1 @@
->From b48dee7d13980d4d901e3035dc6096c28c42c2ed Mon Sep 17 00:00:00 2001
-From: Mel Gorman <mgorman@suse.de>
-Date: Tue, 10 May 2011 15:13:30 +0100
-Subject: [PATCH] mm: slub: Do not wake kswapd for SLUBs speculative high-order allocations
 
-To avoid locking and per-cpu overhead, SLUB optimisically uses
-high-order allocations and falls back to lower allocations if they fail.
-However, by simply trying to allocate, kswapd is woken up to start
-reclaiming at that order. On a desktop system, two users report that the
-system is getting locked up with kswapd using large amounts of CPU.
-Using SLAB instead of SLUB makes this problem go away.
-
-This patch prevents kswapd being woken up for high-order allocations.
-
-Not-signed-off-yet: Mel Gorman <mgorman@suse.de>
----
- mm/slub.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/mm/slub.c b/mm/slub.c
-index 9d2e5e4..98c358d 100644
---- a/mm/slub.c
-+++ b/mm/slub.c
-@@ -1170,7 +1170,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
- 	 * Let the initial higher-order allocation fail under memory pressure
- 	 * so we fall-back to the minimum order allocation.
- 	 */
--	alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;
-+	alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) & ~__GFP_NOFAIL;
- 
- 	page = alloc_slab_page(alloc_gfp, node, oo);
- 	if (unlikely(!page)) {
diff --git a/a/3.hdr b/a/3.hdr
deleted file mode 100644
index a08eabc..0000000
--- a/a/3.hdr
+++ /dev/null
@@ -1,2 +0,0 @@
-Content-Type: text/x-patch; charset=iso-8859-15
-Content-Disposition: attachment; filename="mm-slub-do-not-take-expensive-steps-for-slub-high-orders.patch"
diff --git a/a/3.txt b/a/3.txt
deleted file mode 100644
index 1f0fd2e..0000000
--- a/a/3.txt
+++ /dev/null
@@ -1,59 +0,0 @@
->From 59220aa310c0ba60afee29eeea1e602f4a374c60 Mon Sep 17 00:00:00 2001
-From: Mel Gorman <mgorman@suse.de>
-Date: Tue, 10 May 2011 15:30:20 +0100
-Subject: [PATCH] mm: slub: Do not take expensive steps for SLUBs speculative high-order allocations
-
-To avoid locking and per-cpu overhead, SLUB optimisically uses
-high-order allocations and falls back to lower allocations if they
-fail.  However, by simply trying to allocate, the caller can enter
-compaction or reclaim - both of which are likely to cost more than
-the benefit of using high-order pages in SLUB. On a desktop system,
-two users report that the system is getting locked up with kswapd
-using large amounts of CPU. Using SLAB instead of SLUB makes this
-problem go away.
-
-This patch prevents SLUB taking any expensive steps when trying to use
-high-order allocations. Instead, it is expected to fall back to smaller
-orders more aggressively.
-
-Not-signed-off-yet: Mel Gorman <mgorman@suse.de>
----
- mm/page_alloc.c |    3 ++-
- mm/slub.c       |    3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/mm/page_alloc.c b/mm/page_alloc.c
-index 9f8a97b..f160d93 100644
---- a/mm/page_alloc.c
-+++ b/mm/page_alloc.c
-@@ -1972,6 +1972,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
- {
- 	int alloc_flags = ALLOC_WMARK_MIN | ALLOC_CPUSET;
- 	const gfp_t wait = gfp_mask & __GFP_WAIT;
-+	const gfp_t wakes_kswapd = !(gfp_mask & __GFP_NO_KSWAPD);
- 
- 	/* __GFP_HIGH is assumed to be the same as ALLOC_HIGH to save a branch. */
- 	BUILD_BUG_ON(__GFP_HIGH != (__force gfp_t) ALLOC_HIGH);
-@@ -1984,7 +1985,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask)
- 	 */
- 	alloc_flags |= (__force int) (gfp_mask & __GFP_HIGH);
- 
--	if (!wait) {
-+	if (!wait && wakes_kswapd) {
- 		/*
- 		 * Not worth trying to allocate harder for
- 		 * __GFP_NOMEMALLOC even if it can't schedule.
-diff --git a/mm/slub.c b/mm/slub.c
-index 98c358d..1071723 100644
---- a/mm/slub.c
-+++ b/mm/slub.c
-@@ -1170,7 +1170,8 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
- 	 * Let the initial higher-order allocation fail under memory pressure
- 	 * so we fall-back to the minimum order allocation.
- 	 */
--	alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) & ~__GFP_NOFAIL;
-+	alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) &
-+			~(__GFP_NOFAIL | __GFP_WAIT);
- 
- 	page = alloc_slab_page(alloc_gfp, node, oo);
- 	if (unlikely(!page)) {
diff --git a/a/content_digest b/N1/content_digest
index 4dc809d..da95919 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -51,99 +51,5 @@
  "\01:2\0"
  "fn\0mm-slub-do-not-wake-kswapd-for-slub-high-orders.patch\0"
  "b\0"
- ">From b48dee7d13980d4d901e3035dc6096c28c42c2ed Mon Sep 17 00:00:00 2001\n"
- "From: Mel Gorman <mgorman@suse.de>\n"
- "Date: Tue, 10 May 2011 15:13:30 +0100\n"
- "Subject: [PATCH] mm: slub: Do not wake kswapd for SLUBs speculative high-order allocations\n"
- "\n"
- "To avoid locking and per-cpu overhead, SLUB optimisically uses\n"
- "high-order allocations and falls back to lower allocations if they fail.\n"
- "However, by simply trying to allocate, kswapd is woken up to start\n"
- "reclaiming at that order. On a desktop system, two users report that the\n"
- "system is getting locked up with kswapd using large amounts of CPU.\n"
- "Using SLAB instead of SLUB makes this problem go away.\n"
- "\n"
- "This patch prevents kswapd being woken up for high-order allocations.\n"
- "\n"
- "Not-signed-off-yet: Mel Gorman <mgorman@suse.de>\n"
- "---\n"
- " mm/slub.c |    2 +-\n"
- " 1 files changed, 1 insertions(+), 1 deletions(-)\n"
- "\n"
- "diff --git a/mm/slub.c b/mm/slub.c\n"
- "index 9d2e5e4..98c358d 100644\n"
- "--- a/mm/slub.c\n"
- "+++ b/mm/slub.c\n"
- "@@ -1170,7 +1170,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)\n"
- " \t * Let the initial higher-order allocation fail under memory pressure\n"
- " \t * so we fall-back to the minimum order allocation.\n"
- " \t */\n"
- "-\talloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;\n"
- "+\talloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) & ~__GFP_NOFAIL;\n"
- " \n"
- " \tpage = alloc_slab_page(alloc_gfp, node, oo);\n"
- " \tif (unlikely(!page)) {"
- "\01:3\0"
- "fn\0mm-slub-do-not-take-expensive-steps-for-slub-high-orders.patch\0"
- "b\0"
- ">From 59220aa310c0ba60afee29eeea1e602f4a374c60 Mon Sep 17 00:00:00 2001\n"
- "From: Mel Gorman <mgorman@suse.de>\n"
- "Date: Tue, 10 May 2011 15:30:20 +0100\n"
- "Subject: [PATCH] mm: slub: Do not take expensive steps for SLUBs speculative high-order allocations\n"
- "\n"
- "To avoid locking and per-cpu overhead, SLUB optimisically uses\n"
- "high-order allocations and falls back to lower allocations if they\n"
- "fail.  However, by simply trying to allocate, the caller can enter\n"
- "compaction or reclaim - both of which are likely to cost more than\n"
- "the benefit of using high-order pages in SLUB. On a desktop system,\n"
- "two users report that the system is getting locked up with kswapd\n"
- "using large amounts of CPU. Using SLAB instead of SLUB makes this\n"
- "problem go away.\n"
- "\n"
- "This patch prevents SLUB taking any expensive steps when trying to use\n"
- "high-order allocations. Instead, it is expected to fall back to smaller\n"
- "orders more aggressively.\n"
- "\n"
- "Not-signed-off-yet: Mel Gorman <mgorman@suse.de>\n"
- "---\n"
- " mm/page_alloc.c |    3 ++-\n"
- " mm/slub.c       |    3 ++-\n"
- " 2 files changed, 4 insertions(+), 2 deletions(-)\n"
- "\n"
- "diff --git a/mm/page_alloc.c b/mm/page_alloc.c\n"
- "index 9f8a97b..f160d93 100644\n"
- "--- a/mm/page_alloc.c\n"
- "+++ b/mm/page_alloc.c\n"
- "@@ -1972,6 +1972,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask)\n"
- " {\n"
- " \tint alloc_flags = ALLOC_WMARK_MIN | ALLOC_CPUSET;\n"
- " \tconst gfp_t wait = gfp_mask & __GFP_WAIT;\n"
- "+\tconst gfp_t wakes_kswapd = !(gfp_mask & __GFP_NO_KSWAPD);\n"
- " \n"
- " \t/* __GFP_HIGH is assumed to be the same as ALLOC_HIGH to save a branch. */\n"
- " \tBUILD_BUG_ON(__GFP_HIGH != (__force gfp_t) ALLOC_HIGH);\n"
- "@@ -1984,7 +1985,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask)\n"
- " \t */\n"
- " \talloc_flags |= (__force int) (gfp_mask & __GFP_HIGH);\n"
- " \n"
- "-\tif (!wait) {\n"
- "+\tif (!wait && wakes_kswapd) {\n"
- " \t\t/*\n"
- " \t\t * Not worth trying to allocate harder for\n"
- " \t\t * __GFP_NOMEMALLOC even if it can't schedule.\n"
- "diff --git a/mm/slub.c b/mm/slub.c\n"
- "index 98c358d..1071723 100644\n"
- "--- a/mm/slub.c\n"
- "+++ b/mm/slub.c\n"
- "@@ -1170,7 +1170,8 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)\n"
- " \t * Let the initial higher-order allocation fail under memory pressure\n"
- " \t * so we fall-back to the minimum order allocation.\n"
- " \t */\n"
- "-\talloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) & ~__GFP_NOFAIL;\n"
- "+\talloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY | __GFP_NO_KSWAPD) &\n"
- "+\t\t\t~(__GFP_NOFAIL | __GFP_WAIT);\n"
- " \n"
- " \tpage = alloc_slab_page(alloc_gfp, node, oo);\n"
- " \tif (unlikely(!page)) {"
 
-e0abda368eace74df31e765750f49fe2d101ce50bc7f4375c0e58edc296998a0
+d760459d0e4abbcecadbf3f01eb4e4b6936145af05b1d712d1c49a381a03ba56

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.