All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: xen-devel@lists.xenproject.org
Cc: julien@xen.org, Julien Grall <jgrall@amazon.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: [PATCH v2 0/3] xen/mm: Optimize init_heap_pages()
Date: Fri, 15 Jul 2022 18:03:09 +0100	[thread overview]
Message-ID: <20220715170312.13931-1-julien@xen.org> (raw)

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



             reply	other threads:[~2022-07-15 17:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 17:03 Julien Grall [this message]
2022-07-15 17:03 ` [PATCH v2 1/3] xen: page_alloc: Don't open-code IS_ALIGNED() Julien Grall
2022-07-18  8:06   ` Wei Chen
2022-07-18  8:11   ` Jan Beulich
2022-07-15 17:03 ` [PATCH v2 2/3] xen/heap: Split init_heap_pages() in two Julien Grall
2022-07-18  8:18   ` Wei Chen
2022-07-18 10:05     ` Julien Grall
2022-07-18  9:31   ` Jan Beulich
2022-07-18 10:08     ` Julien Grall
2022-07-18 10:57       ` Jan Beulich
2022-07-15 17:03 ` [PATCH v2 3/3] xen/heap: pass order to free_heap_pages() in heap init Julien Grall
2022-07-18  8:38   ` Wei Chen
2022-07-18  9:43   ` Jan Beulich
2022-07-18 10:24     ` Julien Grall
2022-07-18 11:02       ` Jan Beulich
2022-07-18 17:39         ` Julien Grall
2022-07-19  6:01           ` Jan Beulich
2022-07-20 18:27             ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220715170312.13931-1-julien@xen.org \
    --to=julien@xen.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgrall@amazon.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.