linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, hugetlb: fix "treat_as_movable" condition in htlb_alloc_mask
@ 2017-09-29 15:13 Alexandru Moise
  2017-09-29 20:43 ` Alexandru Moise
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandru Moise @ 2017-09-29 15:13 UTC (permalink / raw)
  To: akpm
  Cc: mike.kravetz, mhocko, n-horiguchi, aneesh.kumar, punit.agrawal,
	gerald.schaefer, aarcange, linux-mm, linux-kernel, kirill

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-30  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-29 15:13 [PATCH] mm, hugetlb: fix "treat_as_movable" condition in htlb_alloc_mask Alexandru Moise
2017-09-29 20:43 ` Alexandru Moise
2017-09-29 21:16   ` Mike Kravetz
2017-09-30  8:35     ` Alexandru Moise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox