All of lore.kernel.org
 help / color / mirror / Atom feed
From: konrad wilk <konrad.wilk@oracle.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Dan Magenheimer <dan.magenheimer@oracle.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH 7/7] xl: Fix 'free_memory' to include outstanding_claims value.
Date: Mon, 15 Apr 2013 20:19:13 -0400	[thread overview]
Message-ID: <516C9901.30706@oracle.com> (raw)
In-Reply-To: <20844.12237.939778.932762@mariner.uk.xensource.com>


On 4/15/2013 12:50 PM, Ian Jackson wrote:
> Ian Jackson writes ("Re: [PATCH 7/7] xl: Fix 'free_memory' to include outstanding_claims value."):
>> Konrad Rzeszutek Wilk writes ("[PATCH 7/7] xl: Fix 'free_memory' to include outstanding_claims value."):
>>> Updating to make it clear that free_memory reported by 'xl info'
>>> is influenced by the outstanding claim value. [...]
>>>       if (libxl_get_physinfo(ctx, &info) != 0) {
>>>           fprintf(stderr, "libxl_physinfo failed.\n");
>>>           return;
>>>       }
>>> -
>>> +    /*
>>> +     * Don't bother checking "claim_mode" as user might have turned it off
>>> +     * and we have outstanding claims.
>>> +     */
>>> +    if ((claims = libxl_get_claiminfo(ctx)) < 0){
>>> +        fprintf(stderr, "libxl_get_claiminfo failed. errno: %d (%s)\n",
>>> +                errno, strerror(errno));
>>> +        return;
>>> +    }
>> ...
>>> +        printf("free_memory            : %"PRIu64"\n", (info.free_pages - claims) / i);
>> This has a race, I think.
> I have checked this and the race is in the hypercall API.  The
> hypercall API has already been checked in.  So, under the
> circumstances, for this patch:
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>

Great! Thanks.
> However, there is a release-critical bug here.  The following things
> need to be changed:
>
>   * We need a race-free version of the hypercall API.
>   * We need a race-free version of the xc API.
>   * We need a race-free version of the libxl API.
>
> I think this is a release-critical bug because fixing it involves an
> API change at all these 3 levels.  We don't want to release 4.3 with
> a broken API as that will complicate fixing this bug.

Right. Let me enumerate some ideas for fixing this on a different thread 
(if we have the same race in mind that you spotted).
>
> George, can you please add this to your tracking list ?
>
> Having said all that, George, am I OK from a freeze POV to pull
> Konrad's series into staging ?

Would you like me to rebase it once more with the s/def_bool/int/ and 
the resurrection of a line change? I can repost just against the 
offending patch?

I might be a bit late with doing it (Tuesday night) since I am traveling 
today.
>
> Ian.

  reply	other threads:[~2013-04-16  0:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 20:56 [PATCH v16] claim and its friends for allocating multiple self-ballooning guests Konrad Rzeszutek Wilk
2013-04-12 20:56 ` [PATCH 1/7] xc: use XENMEM_claim_pages hypercall during guest creation Konrad Rzeszutek Wilk
2013-04-12 20:56 ` [PATCH 2/7] xl: Implement XENMEM_claim_pages support via 'claim_mode' global config Konrad Rzeszutek Wilk
2013-04-12 20:56 ` [PATCH 3/7] xl: 'xl info' print outstanding claims if enabled (claim_mode=1 in xl.conf) Konrad Rzeszutek Wilk
2013-04-12 20:56 ` [PATCH 4/7] xc: export outstanding_pages value in xc_dominfo structure Konrad Rzeszutek Wilk
2013-04-12 20:56 ` [PATCH 5/7] xl: export 'outstanding_pages' value from xcinfo Konrad Rzeszutek Wilk
2013-04-12 20:56 ` [PATCH 6/7] xl: 'xl claims' print outstanding per domain claims Konrad Rzeszutek Wilk
2013-04-15 11:40   ` Ian Jackson
2013-04-12 20:56 ` [PATCH 7/7] xl: Fix 'free_memory' to include outstanding_claims value Konrad Rzeszutek Wilk
2013-04-15 11:41   ` Ian Jackson
2013-04-15 16:50     ` Ian Jackson
2013-04-16  0:19       ` konrad wilk [this message]
2013-04-16 15:33         ` Ian Jackson
2013-04-16 16:45           ` Tim Deegan
2013-04-16 18:35             ` Konrad Rzeszutek Wilk
2013-04-15 15:03   ` Dario Faggioli
2013-04-16  0:13     ` konrad wilk
2013-04-16 15:25 ` [PATCH v16] claim and its friends for allocating multiple self-ballooning guests Ian Jackson
2013-04-16 15:29   ` George Dunlap
2013-04-16 15:33 ` Is: [GIT PULL) (claim.v17) against Xen 4.3-rc0. Was:Re: " Konrad Rzeszutek Wilk

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=516C9901.30706@oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /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.