On Fri, Jan 12, 2018 at 10:48:21AM +0200, Gal Hammer wrote: > > On Thu, Jan 11, 2018 at 9:52 PM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Thu, Jan 11, 2018 at 12:16:56PM +0200, Gal Hammer wrote: > > The loading time of a VM is quite significant when its virtio > > devices uses a large amount of virt-queues (e.g. a virtio-serial > > device with > > max_ports=511). Most of the time is spend in the > > creation of all the required event notifiers (ioeventfd and memory > > regions). > > > > This patch pack all the changes to the memory regions in a > > single memory transaction. > > > > Reported-by: Sitong Liu <si...@redhat.com> > > Reported-by: Xiaoling Gao <xia...@redhat.com> > > Signed-off-by: Gal Hammer <gham...@redhat.com> > > Nice patch! Any timing numbers to share before/after? > > > Thanks. Unfortunately I made a mistake in the shutdown code (the transaction > is wrapping the code which doesn't modify the memory regions), so a V2 is on > its way. > > As for the timing. Running a VM with 25 virtio-serial devices, each one with > max_ports=511, results in a boot time of around 30 minutes. With this patch > (and a another patch to kvm) reduce it to approximately 3 minutes.
Good to know, sounds like an important fix to have. Since you plan to do v2 anyway, please add this info in the commit log. > This was reported and tracked here: > https://bugzilla.redhat.com/show_bug.cgi?id > =1528588 > > Gal.