[patch 144/181] mm/hugetlb: not necessary to coalesce regions recursively

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

 



From: Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx>
Subject: mm/hugetlb: not necessary to coalesce regions recursively

Patch series "mm/hugetlb: code refine and simplification", v4.

Following are some cleanups for hugetlb.  Simple testing with
tools/testing/selftests/vm/map_hugetlb passes.


This patch (of 7):

Per my understanding, we keep the regions ordered and would always
coalesce regions properly.  So the task to keep this property is just to
coalesce its neighbour.

Let's simplify this.

Link: https://lkml.kernel.org/r/20200901014636.29737-1-richard.weiyang@xxxxxxxxxxxxxxxxx
Link: https://lkml.kernel.org/r/20200831022351.20916-1-richard.weiyang@xxxxxxxxxxxxxxxxx
Link: https://lkml.kernel.org/r/20200831022351.20916-2-richard.weiyang@xxxxxxxxxxxxxxxxx
Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx>
Reviewed-by: Baoquan He <bhe@xxxxxxxxxx>
Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/hugetlb.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/mm/hugetlb.c~mm-hugetlb-not-necessary-to-coalesce-regions-recursively
+++ a/mm/hugetlb.c
@@ -309,8 +309,7 @@ static void coalesce_file_region(struct
 		list_del(&rg->link);
 		kfree(rg);
 
-		coalesce_file_region(resv, prg);
-		return;
+		rg = prg;
 	}
 
 	nrg = list_next_entry(rg, link);
@@ -320,9 +319,6 @@ static void coalesce_file_region(struct
 
 		list_del(&rg->link);
 		kfree(rg);
-
-		coalesce_file_region(resv, nrg);
-		return;
 	}
 }
 
_




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux