From: Eduardo Habkost <ehabkost@redhat.com>
To: Michal Privoznik <mprivozn@redhat.com>
Cc: qemu-devel@nongnu.org, famz@redhat.com, pbonzini@redhat.com,
bsd@redhat.com, qemu-stable@nongnu.org,
Yang Hongyang <yanghy@cn.fujitsu.com>,
Jason Wang <jasowang@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] vl: Delay initialization of memory backends
Date: Thu, 1 Sep 2016 14:26:39 -0300 [thread overview]
Message-ID: <20160901172639.GD1151@thinpad.lan.raisama.net> (raw)
In-Reply-To: <f23ae739-aaac-279b-b12e-1f459d373fdd@redhat.com>
On Thu, Sep 01, 2016 at 06:52:42PM +0200, Michal Privoznik wrote:
> On 01.09.2016 17:10, Eduardo Habkost wrote:
> > On Wed, Aug 31, 2016 at 02:47:21PM -0700, no-reply@ec2-52-6-146-230.compute-1.amazonaws.com wrote:
> > [...]
> >> GTESTER check-qtest-x86_64
> >> qemu-system-x86_64: Failed initializing vhost-user memory map, consider using -object memory-backend-file share=on
> >> qemu-system-x86_64: vhost_set_mem_table failed: Success (0)
> > [...]
> >> **
> >> ERROR:/tmp/qemu-test/src/tests/vhost-user-test.c:149:wait_for_fds: assertion failed: (s->fds_num)
> >
> > Ouch. It looks like the ordering requirements are messier than I
> > thought. vhost-user depends on the memory backends to be already
> > initialized.
> >
> > We can't use early initialization because prealloc delays chardev
> > init too much. We can't delay initialization because it is done
> > after netdevs.
> >
> > We _really_ need to change this to simply use the ordering used
> > on the command-line/config instead of hardcoding messy ordering
> > requirements, but I wouldn't like to wait for a QemuOpts
> > refactoring to fix the bug. I will take a look at the memory
> > regions initialization path, and try to trigger the
> > memory-backend prealloc code there.
> >
>
> What I don't understand here is, if kernel already has a pool of
> hugepages from which qemu tries to allocate some, why does allocation
> take up to 1 minute? I would understand if it was during building of the
> pool, but once those pages are reserved allocating them should take no
> time. Isn't this a problem in kernel (too)?
I believe the pages are reserved, but are zeroed when actually
allocated by userspace.
--
Eduardo
next prev parent reply other threads:[~2016-09-01 17:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-31 20:17 [Qemu-devel] [PATCH] vl: Delay initialization of memory backends Eduardo Habkost
2016-08-31 21:47 ` no-reply
2016-09-01 15:10 ` Eduardo Habkost
2016-09-01 15:41 ` Paolo Bonzini
2016-09-01 17:39 ` Eduardo Habkost
2016-09-01 19:34 ` Eduardo Habkost
2016-09-01 22:29 ` Bandan Das
2016-09-02 8:59 ` Paolo Bonzini
2016-09-02 14:04 ` Eduardo Habkost
2016-09-02 14:56 ` Paolo Bonzini
2016-09-02 18:10 ` Eduardo Habkost
2016-09-05 11:53 ` Paolo Bonzini
2016-09-01 16:52 ` Michal Privoznik
2016-09-01 17:26 ` Eduardo Habkost [this message]
2016-09-02 6:13 ` Markus Armbruster
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=20160901172639.GD1151@thinpad.lan.raisama.net \
--to=ehabkost@redhat.com \
--cc=bsd@redhat.com \
--cc=famz@redhat.com \
--cc=jasowang@redhat.com \
--cc=mprivozn@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=yanghy@cn.fujitsu.com \
/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).