mbox series

[00/10] mm/hugetlb: code refine and simplification

Message ID 20200807091251.12129-1-richard.weiyang@linux.alibaba.com (mailing list archive)
Headers show
Series mm/hugetlb: code refine and simplification | expand

Message

Wei Yang Aug. 7, 2020, 9:12 a.m. UTC
Following are some cleanup for hugetlb.

Simple test with tools/testing/selftests/vm/map_hugetlb pass.

Wei Yang (10):
  mm/hugetlb: not necessary to coalesce regions recursively
  mm/hugetlb: make sure to get NULL when list is empty
  mm/hugetlb: use list_splice to merge two list at once
  mm/hugetlb: count file_region to be added when regions_needed != NULL
  mm/hugetlb: remove the redundant check on non_swap_entry()
  mm/hugetlb: remove redundant huge_pte_alloc() in hugetlb_fault()
  mm/hugetlb: a page from buddy is not on any list
  mm/hugetlb: return non-isolated page in the loop instead of break and
    check
  mm/hugetlb: narrow the hugetlb_lock protection area during preparing
    huge page
  mm/hugetlb: not necessary to abuse temporary page to workaround the
    nasty free_huge_page

 mm/hugetlb.c | 101 ++++++++++++++++++++++-----------------------------
 1 file changed, 44 insertions(+), 57 deletions(-)

Comments

Mike Kravetz Aug. 7, 2020, 10:25 p.m. UTC | #1
On 8/7/20 2:12 AM, Wei Yang wrote:
> Following are some cleanup for hugetlb.
> 
> Simple test with tools/testing/selftests/vm/map_hugetlb pass.
> 
> Wei Yang (10):
>   mm/hugetlb: not necessary to coalesce regions recursively
>   mm/hugetlb: make sure to get NULL when list is empty
>   mm/hugetlb: use list_splice to merge two list at once
>   mm/hugetlb: count file_region to be added when regions_needed != NULL
>   mm/hugetlb: remove the redundant check on non_swap_entry()
>   mm/hugetlb: remove redundant huge_pte_alloc() in hugetlb_fault()
>   mm/hugetlb: a page from buddy is not on any list
>   mm/hugetlb: return non-isolated page in the loop instead of break and
>     check
>   mm/hugetlb: narrow the hugetlb_lock protection area during preparing
>     huge page
>   mm/hugetlb: not necessary to abuse temporary page to workaround the
>     nasty free_huge_page
> 
>  mm/hugetlb.c | 101 ++++++++++++++++++++++-----------------------------
>  1 file changed, 44 insertions(+), 57 deletions(-)

Thanks Wei Yang!

I'll take a look at these next week.