+ mm-show-message-when-updating-min_free_kbytes-in-thp.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + mm-show-message-when-updating-min_free_kbytes-in-thp.patch added to -mm tree
To: hanpt@xxxxxxxxxxxxxxxxxx,dave.hansen@xxxxxxxxx,mgorman@xxxxxxx,mhocko@xxxxxxx,rientjes@xxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 14 Jan 2014 15:52:50 -0800


The patch titled
     Subject: mm: show message when updating min_free_kbytes in thp
has been added to the -mm tree.  Its filename is
     mm-show-message-when-updating-min_free_kbytes-in-thp.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-show-message-when-updating-min_free_kbytes-in-thp.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-show-message-when-updating-min_free_kbytes-in-thp.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
Subject: mm: show message when updating min_free_kbytes in thp

min_free_kbytes may be raised during THP's initialization.  Sometimes,
this will change the value which was set by the user.  Showing this
message will clarify this confusion.

Only show this message when changing a value which was set by the user
according to Michal Hocko's suggestion.

Show the old value of min_free_kbytes according to Dave Hansen's
suggestion.  This will give user the chance to restore old value of
min_free_kbytes.

Signed-off-by: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/huge_memory.c |    8 +++++++-
 mm/internal.h    |    1 +
 mm/page_alloc.c  |    2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff -puN mm/huge_memory.c~mm-show-message-when-updating-min_free_kbytes-in-thp mm/huge_memory.c
--- a/mm/huge_memory.c~mm-show-message-when-updating-min_free_kbytes-in-thp
+++ a/mm/huge_memory.c
@@ -130,8 +130,14 @@ static int set_recommended_min_free_kbyt
 			      (unsigned long) nr_free_buffer_pages() / 20);
 	recommended_min <<= (PAGE_SHIFT-10);
 
-	if (recommended_min > min_free_kbytes)
+	if (recommended_min > min_free_kbytes) {
+		if (user_min_free_kbytes >= 0)
+			pr_info("raising min_free_kbytes from %d to %lu "
+				"to help transparent hugepage allocations\n",
+				min_free_kbytes, recommended_min);
+
 		min_free_kbytes = recommended_min;
+	}
 	setup_per_zone_wmarks();
 	return 0;
 }
diff -puN mm/internal.h~mm-show-message-when-updating-min_free_kbytes-in-thp mm/internal.h
--- a/mm/internal.h~mm-show-message-when-updating-min_free_kbytes-in-thp
+++ a/mm/internal.h
@@ -99,6 +99,7 @@ extern void prep_compound_page(struct pa
 #ifdef CONFIG_MEMORY_FAILURE
 extern bool is_free_buddy_page(struct page *page);
 #endif
+extern int user_min_free_kbytes;
 
 #if defined CONFIG_COMPACTION || defined CONFIG_CMA
 
diff -puN mm/page_alloc.c~mm-show-message-when-updating-min_free_kbytes-in-thp mm/page_alloc.c
--- a/mm/page_alloc.c~mm-show-message-when-updating-min_free_kbytes-in-thp
+++ a/mm/page_alloc.c
@@ -205,7 +205,7 @@ static char * const zone_names[MAX_NR_ZO
 };
 
 int min_free_kbytes = 1024;
-int user_min_free_kbytes;
+int user_min_free_kbytes = -1;
 
 static unsigned long __meminitdata nr_kernel_pages;
 static unsigned long __meminitdata nr_all_pages;
_

Patches currently in -mm which might be from hanpt@xxxxxxxxxxxxxxxxxx are

mm-prevent-setting-of-a-value-less-than-0-to-min_free_kbytes.patch
mm-show-message-when-updating-min_free_kbytes-in-thp.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux