From: Alexey G <x1917x@gmail.com>
To: Yessine Daoud <da.yessine@gmail.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
xen-devel@lists.xenproject.org,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
ian.jackson@eu.citrix.com
Subject: Re: Slow HVM boot time, was "HVM boot time optimization"
Date: Fri, 16 Feb 2018 12:08:42 +1000 [thread overview]
Message-ID: <20180216120842.00001cca@gmail.com> (raw)
In-Reply-To: <CABLtV0DfAWpTHizHBpSqJZC9dk7UfWnOfq1OsBh9RSEReDax_g@mail.gmail.com>
On Thu, 15 Feb 2018 17:02:35 +0100
Yessine Daoud <da.yessine@gmail.com> wrote:
> Hello,
>
>I tried to debug the issue and this what I found:
>the HVM boot takes some time at the following section
>(qemu/pc-bios/optionrom/linuxboot.S)
>/* Load kernel and initrd */
>read_fw_blob_addr32_edi(FW_CFG_INITRD) (ramdisk about 3M takes ~~7.s)
>read_fw_blob_addr32(FW_CFG_KERNEL) (vmlinuz about 7M takes ~~15.s)
>read_fw_blob_addr32(FW_CFG_CMDLINE)
>
>#define read_fw_blob_addr32(var) \
>read_fw var ## _ADDR; \
>mov %eax, %edi; \
>read_fw_blob_pre(var); \
>/* old as(1) doesn't like this insn so emit the bytes instead: \
>addr32 rep insb (%dx), %es:(%edi); \
>*/ \
>.dc.b 0x67,0xf3,0x6c
>
>#define read_fw_blob_addr32_edi(var) \
>read_fw_blob_pre(var); \
>/* old as(1) doesn't like this insn so emit the bytes instead: \
>addr32 rep insb (%dx), %es:(%edi); \
>*/ \
>.dc.b 0x67,0xf3,0x6c
>
>Any idea how to speed the I/O read ?
>Thanks.
Hmm, looks like it does rep insb with every I/O iteration emulated
individually for some reason, hence its so slow. Normally it should be
emulated on a buffer basis. There might be a bug somewhere which cause
string I/O to be handled by every iteration.
You may try to collect QEMU trace logs using
device_model_args = ["-trace", "events=<path to your events file>"]
Where the events file should contain lines like this:
xen_ioreq_server_create
xen_ioreq_server_destroy
xen_ioreq_server_state
xen_map_portio_range
xen_unmap_portio_range
cpu_ioreq_pio
cpu_ioreq_pio_read_reg
cpu_ioreq_pio_write_reg
handle_ioreq
handle_ioreq_read
handle_ioreq_write
The resulting log file in /var/log/xen might be large (may even require
to specify XEN_QEMU_CONSOLE_LIMIT=0) but will show how the string I/O
with port 510h is processed. This should narrow the issue.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-02-16 2:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABLtV0BqS_Y6oMt8TyCx55Nf9mB=-L7To+xY2on76p+1KDyXSQ@mail.gmail.com>
2018-02-08 16:31 ` Slow HVM boot time, was "HVM boot time optimization" Stefano Stabellini
2018-02-08 16:38 ` George Dunlap
2018-02-08 16:48 ` Wei Liu
2018-02-08 16:56 ` Anthony PERARD
2018-02-08 17:32 ` Wei Liu
2018-02-12 8:27 ` Yessine Daoud
2018-02-12 14:42 ` Wei Liu
2018-02-15 16:02 ` Yessine Daoud
2018-02-16 2:08 ` Alexey G [this message]
[not found] ` <CABLtV0CnWM2fKQgCQSXdMDK57sOL1LRnLCXgd9ETkkdv4oJj2A@mail.gmail.com>
2018-02-16 10:40 ` Alexey G
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=20180216120842.00001cca@gmail.com \
--to=x1917x@gmail.com \
--cc=anthony.perard@citrix.com \
--cc=da.yessine@gmail.com \
--cc=ian.jackson@eu.citrix.com \
--cc=sstabellini@kernel.org \
--cc=wei.liu2@citrix.com \
--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 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).