From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: dzejrou@gmail.com, qemu-devel@nongnu.org, david@redhat.com,
Michal Privoznik <mprivozn@redhat.com>
Subject: Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus
Date: Tue, 17 May 2022 17:33:54 +0100 [thread overview]
Message-ID: <YoPOclX/REvSIxZK@redhat.com> (raw)
In-Reply-To: <20220517171228.44c53748@redhat.com>
On Tue, May 17, 2022 at 05:12:28PM +0200, Igor Mammedov wrote:
> On Tue, 17 May 2022 14:38:58 +0200
> dzejrou@gmail.com wrote:
>
> > From: Jaroslav Jindrak <dzejrou@gmail.com>
> >
> > Prior to the introduction of the prealloc-threads property, the amount
> > of threads used to preallocate memory was derived from the value of
> > smp-cpus passed to qemu, the amount of physical cpus of the host
> > and a hardcoded maximum value. When the prealloc-threads property
> > was introduced, it included a default of 1 in backends/hostmem.c and
> > a default of smp-cpus using the sugar API for the property itself. The
> > latter default is not used when the property is not specified on qemu's
> > command line, so guests that were not adjusted for this change suddenly
> > started to use the default of 1 thread to preallocate memory, which
> > resulted in observable slowdowns in guest boots for guests with large
> > memory (e.g. when using libvirt <8.2.0 or managing guests manually).
>
> current behavior in QEMU is intentionally conservative. threads
> number is subject to host configuration and limitations management
> layer puts on it and it's not QEMU job to conjure magic numbers that
> are host/workload depended.
I think that's missing the point. QEMU *did* historically set the
prealloc threads equal to num CPUs, so we have precedent here. The
referenced commit lost that behaviour because it only wired up the
defaults in one particular CLI scenario. That's a clear regression
on QEMU's side.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2022-05-17 16:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 12:38 [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus dzejrou
2022-05-17 15:12 ` Igor Mammedov
2022-05-17 15:44 ` Jaroslav Jindrák
2022-05-17 16:33 ` Daniel P. Berrangé [this message]
2022-05-18 10:08 ` Igor Mammedov
2022-05-17 18:46 ` Paolo Bonzini
2022-05-18 10:17 ` Igor Mammedov
2022-05-18 13:02 ` Dario Faggioli
2022-05-18 13:31 ` Daniel P. Berrangé
2022-05-18 14:06 ` Paolo Bonzini
2022-05-19 13:50 ` Igor Mammedov
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=YoPOclX/REvSIxZK@redhat.com \
--to=berrange@redhat.com \
--cc=david@redhat.com \
--cc=dzejrou@gmail.com \
--cc=imammedo@redhat.com \
--cc=mprivozn@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).