xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH v3 3/4] libxc: rework vnuma bits in setup_guest
Date: Wed, 3 Jun 2015 11:34:49 +0100	[thread overview]
Message-ID: <1433327689.7108.62.camel@citrix.com> (raw)
In-Reply-To: <556CBE14.3010509@oracle.com>

On Mon, 2015-06-01 at 16:18 -0400, Boris Ostrovsky wrote:
> On 06/01/2015 06:19 AM, Wei Liu wrote:
> > Make the setup process similar to PV counterpart. That is, to allocate a
> > P2M array that covers the whole memory range and start from there. This
> > is clearer than using an array with no holes in it.
> >
> > Also the dummy layout should take MMIO hole into consideration. We might
> > end up having two vmemranges in the dummy layout.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

+ my ack on all 4 -> applied.

> with a couple of nits below that you might consider.

These can be done in followups, so I applied.

I have a passing comment on one of the nits:

> > +    for ( vmemid = 0; vmemid < args->nr_vmemranges; vmemid++ )
> > +    {
> > +        uint64_t pfn;
> > +
> > +        for ( pfn = args->vmemranges[vmemid].start >> PAGE_SHIFT;
> > +              pfn < args->vmemranges[vmemid].end >> PAGE_SHIFT;
> > +              pfn++ )
> > +            page_array[pfn] = pfn;
> > +    }
> >   
> >       /*
> >        * Try to claim pages for early warning of insufficient memory available.
> > @@ -645,6 +679,12 @@ static int setup_guest(xc_interface *xch,
> >    error_out:
> >       rc = -1;
> >    out:
> > +    if ( use_dummy )
> 
> Or 'if (args->vmemranges == dummy_vmemrange)' and drop use_dummy variable.

FWIW a more normal approach would be to do all the calculations on local
variables and propagate them to the caller in the !use_dummy case. I
don't know if that implies some huge restructure of this function
though.

  reply	other threads:[~2015-06-03 10:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 10:19 [PATCH v3 0/4] Fix HVM vNUMA Wei Liu
2015-06-01 10:19 ` [PATCH v3 1/4] libxc/libxl: fill xc_hvm_build_args in libxl Wei Liu
2015-06-01 10:19 ` [PATCH v3 2/4] libxc: print more error messages when failed Wei Liu
2015-06-01 10:19 ` [PATCH v3 3/4] libxc: rework vnuma bits in setup_guest Wei Liu
2015-06-01 20:18   ` Boris Ostrovsky
2015-06-03 10:34     ` Ian Campbell [this message]
2015-06-03 10:39       ` Wei Liu
2015-06-03 10:57         ` Ian Campbell
2015-06-03 11:04           ` Wei Liu
2015-06-01 10:19 ` [PATCH v3 4/4] libxl: fix HVM vNUMA Wei Liu

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=1433327689.7108.62.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dario.faggioli@citrix.com \
    --cc=wei.liu2@citrix.com \
    --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).