[PATCH v2 0/3] xen/mm: Optimize init_heap_pages()

Julien Grall posted 3 patches 1 year, 9 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20220715170312.13931-1-julien@xen.org
xen/common/page_alloc.c | 106 ++++++++++++++++++++++++++++++----------
1 file changed, 79 insertions(+), 27 deletions(-)
[PATCH v2 0/3] xen/mm: Optimize init_heap_pages()
Posted by Julien Grall 1 year, 9 months ago
From: Julien Grall <jgrall@amazon.com>

Hi all,

As part of the Live-Update work, we noticed that a big part Xen boot
is spent to add pages in the heap. For instance, on when running Xen
in a nested envionment on a c5.metal with 90GB, it takes ~1.4s.

This small series is reworking init_heap_pages() to give the pages
to free_heap_pages() by chunk rather than one by one.

With this approach, the time spent to init the heap is down
to 96 ms in the setup mention above.

There is potentially one more optimization possible that would
allow to further reduce the time spent. The new approach is accessing
the page information multiple time in separate loop that can potentially
be large.

Cheers,

Julien Grall (2):
  xen: page_alloc: Don't open-code IS_ALIGNED()
  xen/heap: Split init_heap_pages() in two
  xen/heap: pass order to free_heap_pages() in heap init

 xen/common/page_alloc.c | 106 ++++++++++++++++++++++++++++++----------
 1 file changed, 79 insertions(+), 27 deletions(-)

-- 
2.32.0