qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Anthony Perard <anthony.perard@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 4/4] xen: Avoid VLA
Date: Tue, 18 Jun 2019 07:50:18 +0000	[thread overview]
Message-ID: <424f82301a824e1fb0a140972268fa8f@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <20190617173649.GB13449@perard.uk.xensource.com>

> -----Original Message-----
> From: Anthony PERARD [mailto:anthony.perard@citrix.com]
> Sent: 17 June 2019 18:37
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: qemu-devel@nongnu.org; xen-devel@lists.xenproject.org; Stefano Stabellini <sstabellini@kernel.org>
> Subject: Re: [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.

That sounds better :-)

Cheers,

  Paul

> 
> Thanks,
> 
> --
> Anthony PERARD


  reply	other threads:[~2019-06-18  7:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 15:41 [Qemu-devel] [PATCH 0/4] Fix build of Xen support + cleanup Anthony PERARD
2019-06-17 15:41 ` [Qemu-devel] [PATCH 1/4] xen: Fix build with public headers Anthony PERARD
2019-06-17 16:05   ` Paul Durrant
2019-06-17 15:41 ` [Qemu-devel] [PATCH 2/4] xen: Import other xen/io/*.h Anthony PERARD
2019-06-17 16:09   ` Paul Durrant
2019-06-17 15:41 ` [Qemu-devel] [PATCH 3/4] xen: Import Xen public headers used by xen-hvm.c Anthony PERARD
2019-06-17 16:15   ` Paul Durrant
2019-06-17 16:45     ` Anthony PERARD
2019-06-17 16:54       ` Paul Durrant
2019-06-17 17:19       ` [Qemu-devel] [Xen-devel] " Anthony PERARD
2019-06-18  7:55         ` Paul Durrant
2019-06-18 11:05           ` Anthony PERARD
2019-06-17 15:41 ` [Qemu-devel] [PATCH 4/4] xen: Avoid VLA Anthony PERARD
2019-06-17 16:39   ` Paul Durrant
2019-06-17 17:36     ` Anthony PERARD
2019-06-18  7:50       ` Paul Durrant [this message]
2019-06-17 18:09 ` [Qemu-devel] [Xen-devel] [PATCH 0/4] Fix build of Xen support + cleanup no-reply

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=424f82301a824e1fb0a140972268fa8f@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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).