From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] exec: optimize phys_page_set_level
Date: Fri, 22 May 2015 09:01:08 +0100 [thread overview]
Message-ID: <20150522080108.GA19677@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1432214398-14990-1-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
On Thu, May 21, 2015 at 03:19:58PM +0200, Paolo Bonzini wrote:
> phys_page_set_level is writing zeroes to a struct that has just been
> filled in by phys_map_node_alloc. Instead, tell phys_map_node_alloc
> whether to fill in the page "as a leaf" or "as a non-leaf".
>
> memcpy is faster than struct assignment, which copies each bitfield
> individually. Arguably a compiler bug, but memcpy is super-special
> cased anyway so what could go wrong?
>
> This cuts the cost of phys_page_set_level from 25% to 5% when
> booting qboot.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> exec.c | 24 ++++++++++--------------
> 1 file changed, 10 insertions(+), 14 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-05-22 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 13:19 [Qemu-devel] [PATCH] exec: optimize phys_page_set_level Paolo Bonzini
2015-05-22 8:01 ` Stefan Hajnoczi [this message]
2015-06-03 4:30 ` Richard Henderson
2015-06-03 7:03 ` Paolo Bonzini
2015-06-03 16:14 ` Michael S. Tsirkin
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=20150522080108.GA19677@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).