Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742192

[PATCH] mm, hugetlb: fix "treat_as_movable" condition in htlb_alloc_mask

From Alexandru Moise <00moses.alexander00@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] mm, hugetlb: fix "treat_as_movable" condition in htlb_alloc_mask
Date 2017-09-29 17:20 +0200
Message-ID <uv5f4-7SN-23@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


If hugepage_migration_supported() returns true, this renders the
hugepages_treat_as_movable sysctl completely pointless.

Let's keep this behavior optional by switching the if() condition
from || to &&.

Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
---
 mm/hugetlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 424b0ef08a60..ab28de0122af 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -926,7 +926,7 @@ static struct page *dequeue_huge_page_nodemask(struct hstate *h, gfp_t gfp_mask,
 /* Movability of hugepages depends on migration support. */
 static inline gfp_t htlb_alloc_mask(struct hstate *h)
 {
-	if (hugepages_treat_as_movable || hugepage_migration_supported(h))
+	if (hugepages_treat_as_movable && hugepage_migration_supported(h))
 		return GFP_HIGHUSER_MOVABLE;
 	else
 		return GFP_HIGHUSER;
-- 
2.14.2

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mm, hugetlb: fix "treat_as_movable" condition in  htlb_alloc_mask Alexandru Moise <00moses.alexander00@gmail.com> - 2017-09-29 17:20 +0200
  Re: [PATCH] mm, hugetlb: fix "treat_as_movable" condition in  htlb_alloc_mask Alexandru Moise <00moses.alexander00@gmail.com> - 2017-09-29 22:50 +0200
    Re: [PATCH] mm, hugetlb: fix "treat_as_movable" condition in  htlb_alloc_mask Mike Kravetz <mike.kravetz@oracle.com> - 2017-09-29 23:20 +0200
      Re: [PATCH] mm, hugetlb: fix "treat_as_movable" condition in  htlb_alloc_mask Alexandru Moise <00moses.alexander00@gmail.com> - 2017-09-30 10:40 +0200

csiph-web