xen/heap: Split init_heap_pages() in two
authorJulien Grall <jgrall@amazon.com>
Wed, 20 Jul 2022 18:25:16 +0000 (19:25 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 20 Jul 2022 18:26:19 +0000 (19:26 +0100)
commit24a53060bd375ab7e95eda9417bb66d821524c59
treef394877b865945cd8d992f3d3ea64568732cfef3
parent7a2b7edad5d5508e2d6a2e5d0ad0399ae16e9c8e
xen/heap: Split init_heap_pages() in two

At the moment, init_heap_pages() will call free_heap_pages() page
by page. To reduce the time to initialize the heap, we will want
to provide multiple pages at the same time.

init_heap_pages() is now split in two parts:
    - init_heap_pages(): will break down the range in multiple set
      of contiguous pages. For now, the criteria is the pages should
      belong to the same NUMA node.
    - _init_heap_pages(): will initialize a set of pages belonging to
      the same NUMA node. In a follow-up patch, new requirements will
      be added (e.g. pages should belong to the same zone). For now the
      pages are still passed one by one to free_heap_pages().

Note that the comment before init_heap_pages() is heavily outdated and
does not reflect the current code. So update it.

This patch is a merge/rework of patches from David Woodhouse and
Hongyan Xia.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/page_alloc.c