qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 10/14] migration: Make PageSearchStatus part of RAMState


From: Dr. David Alan Gilbert
Subject: Re: [PATCH 10/14] migration: Make PageSearchStatus part of RAMState
Date: Thu, 6 Oct 2022 09:36:16 +0100
User-agent: Mutt/2.2.7 (2022-08-07)

* Peter Xu (peterx@redhat.com) wrote:
> On Wed, Oct 05, 2022 at 07:51:34PM +0100, Dr. David Alan Gilbert wrote:
> > >  /* struct contains XBZRLE cache and a static page
> > >     used by the compression */
> > >  static struct {
> > > @@ -319,6 +359,11 @@ typedef struct {
> > >  struct RAMState {
> > >      /* QEMUFile used for this migration */
> > >      QEMUFile *f;
> > > +    /*
> > > +     * PageSearchStatus structures for the channels when send pages.
> > > +     * Protected by the bitmap_mutex.
> > > +     */
> > > +    PageSearchStatus pss[RAM_CHANNEL_MAX];
> > 
> > Why statically size this rather than allocate it in ram_state_init ?
> 
> I don't strongly feel like it needs the complexity? As there're only at
> most 2 channels anyway, so the best chance is we save ~56 bytes on src qemu
> but only during migration (RAMState allocated only in ram setup).
> 
> If you think we should still do the dynamic allcation, definitely doable on
> my side too.

Oh for 2 channels, yes that's fine - what confused me here was
'RAM_CHANNEL_...' - I forgot that was PRE vs POST - I was getting
confused with multifd channel numbering; too many concepts of 'channel'.

Dave

> -- 
> Peter Xu
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]