All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	andrew.cooper3@citrix.com
Subject: Re: [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured
Date: Fri, 11 Sep 2015 14:59:07 +0100	[thread overview]
Message-ID: <1441979947.3549.40.camel@citrix.com> (raw)
In-Reply-To: <20150911134308.GK1695@zion.uk.xensource.com>

On Fri, 2015-09-11 at 14:43 +0100, Wei Liu wrote:
> On Fri, Sep 11, 2015 at 02:21:17PM +0100, Ian Campbell wrote:
> > On Fri, 2015-09-11 at 11:50 +0100, Ian Campbell wrote:
> > > But "is d->vnuma" corresponds to there being vnuma config for the
> > > domain. 
> > 
> > We discussed this IRL and concluded that we should stop trying to
> > differentiate "no vnuma configuration" from "has empty vnuma
> > configuration".
> > 
> > So this code should raise this error if xc_domain_getvnuma returns
> > anything
> > other than rc == -1 && errno == XEN_EOPNOTSUPP. So the check is
> > 
> >     if ( rc != -1 || errno != XEN_EOPNOTSUPP )
> > 
> 
> To be precise, this should be
> 
>       if ( rc != -1 || errno == XEN_EOPNOTSUPP )
> 
> (your if expression contradicts what you said)

I don't think it did, but they are inverses of each other, due to the
"other than" wording in the prose.
		errno == OPNOTSUPP	errno != OPNOTSUPP
rc >=0		???			Some vnuma config
rc ==-1		No vnuma config(*)	Some other error

(*) is the only situation which is allowed, which is what I described in
the text.

But the if needs to reject the other 3 cases, so it is in the inverse test.
rc != -1 covers the top row, and errno != OPNOTSUPP covers the second
column, if either are true then we do not want to proceed.

Ian.

  reply	other threads:[~2015-09-11 13:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 14:50 [PATCH for 4.6 v3 0/3] More vNUMA patches Wei Liu
2015-09-10 14:50 ` [PATCH for 4.6 v3 1/3] libxc: introduce xc_domain_getvnuma Wei Liu
2015-09-10 14:50 ` [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured Wei Liu
2015-09-10 16:10   ` Ian Campbell
2015-09-10 16:15     ` Wei Liu
2015-09-10 16:53       ` Ian Campbell
2015-09-10 17:05         ` Wei Liu
2015-09-11 10:50           ` Ian Campbell
2015-09-11 13:21             ` Ian Campbell
2015-09-11 13:43               ` Wei Liu
2015-09-11 13:59                 ` Ian Campbell [this message]
2015-09-11 14:11                   ` Wei Liu
2015-09-10 14:50 ` [PATCH for 4.6 v3 3/3] xl: handle empty vnuma configuration Wei Liu
2015-09-10 15:35   ` Ian Campbell

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=1441979947.3549.40.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.