On Wed, Feb 19, 2020 at 12:36:04PM +0100, Paolo Bonzini wrote:
> On 18/02/20 19:22, Stefan Hajnoczi wrote:
> > + * It is likely that the number of ioeventfds hasn't changed much, so
> > use
> > + * the previous size as the starting value.
> > + */
> > +ioeventfd_max = as->ioeventfd
On 19/02/20 10:18, Stefan Hajnoczi wrote:
>> ... do exponential increase here (max*=2) instead so still easy to
>> converge?
> I'm happy to tweak the policy. Let's see what Paolo thinks.
I included Peter's suggestion in my own tweak. Thanks to both of you!
Paolo
On 18/02/20 19:22, Stefan Hajnoczi wrote:
> + * It is likely that the number of ioeventfds hasn't changed much, so use
> + * the previous size as the starting value.
> + */
> +ioeventfd_max = as->ioeventfd_nb;
> +ioeventfds = g_new(MemoryRegionIoeventfd, ioeventfd_max);
This wo
On Tue, Feb 18, 2020 at 9:50 PM Peter Xu wrote:
>
> On Tue, Feb 18, 2020 at 06:22:26PM +, Stefan Hajnoczi wrote:
> > Reallocing the ioeventfds[] array each time an element is added is very
> > expensive as the number of ioeventfds increases. Batch allocate instead
> > to amortize the cost of
On Tue, Feb 18, 2020 at 06:22:26PM +, Stefan Hajnoczi wrote:
> Reallocing the ioeventfds[] array each time an element is added is very
> expensive as the number of ioeventfds increases. Batch allocate instead
> to amortize the cost of realloc.
>
> This patch reduces Linux guest boot times fro
Reallocing the ioeventfds[] array each time an element is added is very
expensive as the number of ioeventfds increases. Batch allocate instead
to amortize the cost of realloc.
This patch reduces Linux guest boot times from 362s to 140s when there
are 2 virtio-blk devices with 1 virtqueue and 99