All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	dslutz@verizon.com, xen-devel@lists.xen.org
Subject: Re: QEMU bumping memory bug analysis
Date: Fri, 5 Jun 2015 19:49:40 +0100	[thread overview]
Message-ID: <1433530180.3342.17.camel@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1506051751380.19838@kaball.uk.xensource.com>

On Fri, 2015-06-05 at 18:10 +0100, Stefano Stabellini wrote:
> On Fri, 5 Jun 2015, Wei Liu wrote:
> > Hi all
> > 
> > This bug is now considered a blocker for 4.6 release.
> > 
> > The premises of the problem remain the same (George's translated
> > version):
> > 
> > 1. QEMU may need extra pages from Xen to implement option ROMS, and so at
> >    the moment it calls set_max_mem() to increase max_pages so that it can
> >    allocate more pages to the guest.  libxl doesn't know what max_pages a
> >    domain needs prior to qemu start-up.
> > 
> > 2. Libxl doesn't know max_pages even after qemu start-up, because there
> >    is no mechanism to communicate between qemu and libxl.
> 
> I might not know what is the right design for the overall solution, but
> I do know that libxl shouldn't have its own state tracking for
> max_pages, because max_pages is kept, maintained and enforced by Xen.
> 
> Ian might still remember, but at the beginning of the xl/libxl project,
> we had few simple design principles. One of which was that we should not
> have two places where we keep track of the same thing. If Xen keeps
> track of something, libxl should avoid it.

This isn't about libxl tracking something duplicating information in
Xen. It is about who gets to choose what that value is, which is not the
same as who stores that value.

So this is about libxl being the owner of what the current maxmem value
is. It can so this by using setmaxmem and getmaxmem to set and retrieve
the value with no state in libxl.

> I disagree that libxl should be the arbitrator of a property that is
> stored, maintained and enforced by Xen. Xen should be the arbitrator.

That's not what "arbitrator" means, an arbitrator decides what the value
should be, but that doesn't necessarily imply that it either stores,
maintains nor enforces that value. 

> Even if QEMU called into libxl to change maxmem, I don't think that
> libxl should store maxmem anywhere. It is already stored in Xen.

I don't think anyone suggested otherwise, did they?

What locking is there around QEMU's read/modify/write of the maxmem
value? What happens if someone else also modifies maxmem at the same
time?

Ian.

  parent reply	other threads:[~2015-06-05 18:49 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 16:43 QEMU bumping memory bug analysis Wei Liu
2015-06-05 16:58 ` Ian Campbell
2015-06-05 17:13   ` Stefano Stabellini
2015-06-05 19:06     ` Wei Liu
2015-06-05 17:17   ` Andrew Cooper
2015-06-05 17:39   ` Wei Liu
2015-06-05 17:10 ` Stefano Stabellini
2015-06-05 18:10   ` Wei Liu
2015-06-08 11:39     ` Stefano Stabellini
2015-06-08 12:14       ` Andrew Cooper
2015-06-08 13:01         ` Stefano Stabellini
2015-06-08 13:33           ` Jan Beulich
2015-06-08 13:10       ` Wei Liu
2015-06-08 13:27         ` Stefano Stabellini
2015-06-08 13:32           ` Wei Liu
2015-06-08 13:38             ` Stefano Stabellini
2015-06-08 13:44               ` Andrew Cooper
2015-06-08 13:45                 ` Stefano Stabellini
2015-06-05 18:49   ` Ian Campbell [this message]
2015-06-08 11:40     ` Stefano Stabellini
2015-06-08 12:11       ` Ian Campbell
2015-06-08 13:22         ` Stefano Stabellini
2015-06-08 13:52           ` Ian Campbell
2015-06-08 14:20           ` George Dunlap
2015-06-08 15:01             ` Don Slutz
2015-06-08 15:37               ` George Dunlap
2015-06-08 16:06                 ` Don Slutz
2015-06-09 10:00                   ` George Dunlap
2015-06-09 10:17                     ` Wei Liu
2015-06-09 10:14                 ` Stefano Stabellini
2015-06-09 11:20                   ` George Dunlap
2015-06-16 16:44                     ` Stefano Stabellini
2015-06-09 12:45                   ` Ian Campbell
2015-06-17 13:35                     ` Stefano Stabellini
2015-06-08 14:53         ` Konrad Rzeszutek Wilk
2015-06-08 15:20           ` George Dunlap
2015-06-08 15:42             ` Konrad Rzeszutek Wilk
2015-06-08 14:14   ` George Dunlap

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=1433530180.3342.17.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dslutz@verizon.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.