]> git.baikalelectronics.ru Git - kernel.git/commit
mm/hugetlb: add available_huge_pages() func
authorXin Hao <xhao@linux.alibaba.com>
Thu, 22 Sep 2022 02:19:29 +0000 (10:19 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:35 +0000 (14:03 -0700)
commite79486ff600fdab73b8ffcb90e9e5db596d39900
treece7dfcae9b1c8c6af6be33e13549cd380e346ff3
parent38133e305ba6d94f348ca3efae600ab899f13d60
mm/hugetlb: add available_huge_pages() func

In hugetlb.c there are several places which compare the values of
'h->free_huge_pages' and 'h->resv_huge_pages', it looks a bit messy, so
add a new available_huge_pages() function to do these.

Link: https://lkml.kernel.org/r/20220922021929.98961-1-xhao@linux.alibaba.com
Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c