lkml.org 
[lkml]   [2017]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/1] mm/migrate: do not call prep_transhuge_page if !thp_migration_supported
new_page_nodemask in linux/migrate.h should not call prep_transhuge_page
if thp_migration_support is false.

Fixes commit 8135d8926c08 ("mm: memory_hotplug: memory hotremove supports
thp migration")

Signed-off-by: Andrea Reale <ar@linux.vnet.ibm.com>
---
include/linux/migrate.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 895ec0c..725eac5 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -54,7 +54,7 @@ static inline struct page *new_page_nodemask(struct page *page,
new_page = __alloc_pages_nodemask(gfp_mask, order,
preferred_nid, nodemask);

- if (new_page && PageTransHuge(page))
+ if (thp_migration_supported() && new_page && PageTransHuge(page))
prep_transhuge_page(new_page);

return new_page;
--
2.7.4
\
 
 \ /
  Last update: 2017-11-20 17:18    [W:4.277 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site