[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/4] xen: Avoid VLA



On Mon, Jun 17, 2019 at 05:39:09PM +0100, Paul Durrant wrote:
> > @@ -632,6 +633,8 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
> >          return;
> >      }
> > 
> > +    bitmap = g_new0(unsigned long, bitmap_size);
> > +
> 
> How hot is this function? It looks (unsurprisingly) like the section
> size determines the map size so I wonder whether it can instead be
> allocated once when the section is added?

I think we can store the bitmap buffer into the `state' where
`log_for_dirtybit' is already present, and free the bitmap when
`log_for_dirtybit' is cleared.

Thanks,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.