]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm: hugetlb: directly pass order when allocate a hugetlb folio
authorKefeng Wang <wangkefeng.wang@huawei.com>
Wed, 10 Sep 2025 13:39:56 +0000 (21:39 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 21 Sep 2025 21:22:11 +0000 (14:22 -0700)
commit4a25f995bd59843a898b531bb3e472d710ef9439
treec5bb8552e14aba85f2ae1d62c50d2c3fa3129eb7
parent4094d3434b25a1f0524c28bc3a253fd09d05c361
mm: hugetlb: directly pass order when allocate a hugetlb folio

Use order instead of struct hstate to remove huge_page_order() call from
all hugetlb folio allocation, also order_is_gigantic() is added to check
whether it is a gigantic order.

Link: https://lkml.kernel.org/r/20250910133958.301467-4-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/hugetlb.h
mm/hugetlb.c
mm/hugetlb_cma.c
mm/hugetlb_cma.h