All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20140122060506.GA2657@localhost.localdomain>

diff --git a/a/1.txt b/N1/1.txt
index efc1409..48aaa2e 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -22,3 +22,43 @@ here:
 http://ozlabs.org/~akpm/mmotm/broken-out/mm-show-message-when-updating-min_free_kbytes-in-thp.patch
 
 please have a look. Thanks.
+
+
+>From 8b79586ff9a1d85cbe45102a86888268094ec0ae Mon Sep 17 00:00:00 2001
+From: Han Pingtian <hanpt@linux.vnet.ibm.com>
+Date: Tue, 21 Jan 2014 17:24:43 +0800
+Subject: [PATCH] mm: restore user defined min_free_kbytes when disabling thp
+
+thp increases the value of min_free_kbytes in initialization. This will
+change the user defined value of min_free_kbytes sometimes. So try to
+restore the value when disabling thp if the value has been changed in
+thp initialization and isn't changed by user afte that.
+
+Signed-off-by: Han Pingtian <hanpt@linux.vnet.ibm.com>
+---
+ mm/huge_memory.c |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/mm/huge_memory.c b/mm/huge_memory.c
+index 94a824f..fcb8ce58 100644
+--- a/mm/huge_memory.c
++++ b/mm/huge_memory.c
+@@ -164,6 +164,16 @@ static int start_khugepaged(void)
+ 	} else if (khugepaged_thread) {
+ 		kthread_stop(khugepaged_thread);
+ 		khugepaged_thread = NULL;
++
++		if (user_min_free_kbytes >= 0 && 
++		    user_min_free_kbytes != min_free_kbytes) {
++			pr_info("restore min_free_kbytes from %d to user "
++				"defined %d when stopping khugepaged\n",
++				min_free_kbytes, user_min_free_kbytes);
++
++			min_free_kbytes = user_min_free_kbytes;
++			setup_per_zone_wmarks();
++		}
+ 	}
+ 
+ 	return err;
+-- 
+1.7.7.6
diff --git a/a/content_digest b/N1/content_digest
index 63f8a7a..e085185 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -35,6 +35,46 @@
  "\n"
  "http://ozlabs.org/~akpm/mmotm/broken-out/mm-show-message-when-updating-min_free_kbytes-in-thp.patch\n"
  "\n"
- please have a look. Thanks.
+ "please have a look. Thanks.\n"
+ "\n"
+ "\n"
+ ">From 8b79586ff9a1d85cbe45102a86888268094ec0ae Mon Sep 17 00:00:00 2001\n"
+ "From: Han Pingtian <hanpt@linux.vnet.ibm.com>\n"
+ "Date: Tue, 21 Jan 2014 17:24:43 +0800\n"
+ "Subject: [PATCH] mm: restore user defined min_free_kbytes when disabling thp\n"
+ "\n"
+ "thp increases the value of min_free_kbytes in initialization. This will\n"
+ "change the user defined value of min_free_kbytes sometimes. So try to\n"
+ "restore the value when disabling thp if the value has been changed in\n"
+ "thp initialization and isn't changed by user afte that.\n"
+ "\n"
+ "Signed-off-by: Han Pingtian <hanpt@linux.vnet.ibm.com>\n"
+ "---\n"
+ " mm/huge_memory.c |   10 ++++++++++\n"
+ " 1 files changed, 10 insertions(+), 0 deletions(-)\n"
+ "\n"
+ "diff --git a/mm/huge_memory.c b/mm/huge_memory.c\n"
+ "index 94a824f..fcb8ce58 100644\n"
+ "--- a/mm/huge_memory.c\n"
+ "+++ b/mm/huge_memory.c\n"
+ "@@ -164,6 +164,16 @@ static int start_khugepaged(void)\n"
+ " \t} else if (khugepaged_thread) {\n"
+ " \t\tkthread_stop(khugepaged_thread);\n"
+ " \t\tkhugepaged_thread = NULL;\n"
+ "+\n"
+ "+\t\tif (user_min_free_kbytes >= 0 && \n"
+ "+\t\t    user_min_free_kbytes != min_free_kbytes) {\n"
+ "+\t\t\tpr_info(\"restore min_free_kbytes from %d to user \"\n"
+ "+\t\t\t\t\"defined %d when stopping khugepaged\\n\",\n"
+ "+\t\t\t\tmin_free_kbytes, user_min_free_kbytes);\n"
+ "+\n"
+ "+\t\t\tmin_free_kbytes = user_min_free_kbytes;\n"
+ "+\t\t\tsetup_per_zone_wmarks();\n"
+ "+\t\t}\n"
+ " \t}\n"
+ " \n"
+ " \treturn err;\n"
+ "-- \n"
+ 1.7.7.6
 
-069cc77314a3f6f3dbab537102c74231e2973c3882a2d9cc1490029809f57ee2
+6ae804f0124673ab5cc133cc78ef5ac2f50f6f028351ab75ad923b5e15f903c8

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.