From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Wei Liu <wl@xen.org>
Cc: "Juergen Gross" <jgross@suse.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>,
"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
"George Dunlap" <George.Dunlap@eu.citrix.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Paul Durrant" <pdurrant@amazon.com>,
"Ian Jackson" <ian.jackson@eu.citrix.com>,
"George Dunlap" <george.dunlap@citrix.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Anthony PERARD" <anthony.perard@citrix.com>,
xen-devel@lists.xenproject.org,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH-for-4.13 v7] Rationalize max_grant_frames and max_maptrack_frames handling
Date: Fri, 29 Nov 2019 22:15:33 +0100 [thread overview]
Message-ID: <20191129211533.GF5763@mail-itl> (raw)
In-Reply-To: <20191129174423.hbzdjtcondvnbts2@debian>
[-- Attachment #1.1: Type: text/plain, Size: 3664 bytes --]
On Fri, Nov 29, 2019 at 05:44:23PM +0000, Wei Liu wrote:
> On Fri, Nov 29, 2019 at 05:36:11PM +0000, Wei Liu wrote:
> > On Fri, Nov 29, 2019 at 05:24:45PM +0000, Paul Durrant wrote:
> > > From: George Dunlap <george.dunlap@citrix.com>
> > >
> > > Xen used to have single, system-wide limits for the number of grant
> > > frames and maptrack frames a guest was allowed to create. Increasing
> > > or decreasing this single limit on the Xen command-line would change
> > > the limit for all guests on the system.
> > >
> > > Later, per-domain limits for these values was created. The system-wide
> > > limits became strict limits: domains could not be created with higher
> > > limits, but could be created with lower limits. However, that change
> > > also introduced a range of different "default" values into various
> > > places in the toolstack:
> > >
> > > - The python libxc bindings hard-coded these values to 32 and 1024,
> > > respectively
> > > - The libxl default values are 32 and 1024 respectively.
> > > - xl will use the libxl default for maptrack, but does its own default
> > > calculation for grant frames: either 32 or 64, based on the max
> > > possible mfn.
> > >
> > > These defaults interact poorly with the hypervisor command-line limit:
> > >
> > > - The hypervisor command-line limit cannot be used to raise the limit
> > > for all guests anymore, as the default in the toolstack will
> > > effectively override this.
> > > - If you use the hypervisor command-line limit to *reduce* the limit,
> > > then the "default" values generated by the toolstack are too high,
> > > and all guest creations will fail.
> > >
> > > In other words, the toolstack defaults require any change to be
> > > effected by having the admin explicitly specify a new value in every
> > > guest.
> > >
> > > In order to address this, have grant_table_init treat negative values
> > > for max_grant_frames and max_maptrack_frames as instructions to use the
> > > system-wide default, and have all the above toolstacks default to passing
> > > -1 unless a different value is explicitly configured.
> > >
> > > This restores the old behavior in that changing the hypervisor command-line
> > > option can change the behavior for all guests, while retaining the ability
> > > to set per-guest values. It also removes the bug that reducing the
> > > system-wide max will cause all domains without explicit limits to fail.
> > >
> > > NOTE: - The Ocaml bindings require the caller to always specify a value,
> > > and the code to start a xenstored stubdomain hard-codes these to 4
> > > and 128 respectively; this behavour will not be modified.
> > >
> > > Signed-off-by: George Dunlap <george.dunlap@citrix.com>
> > > Signed-off-by: Paul Durrant <pdurrant@amazon.com>
> > > Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > > Reviewed-by: Jan Beulich <jbeulich@suse.com>
> > > Release-acked-by: Juergen Gross <jgross@suse.com>
> >
> > Acked-by: Wei Liu <wl@xen.org>
>
> In theory I should wait for Marek's ack for changes to python binding,
> but the changes are trivial there so I plan to push this patch later
> tonight to both staging and staging-4.13 so that it can be tested over
> the weekend.
>
> Marek, I apologise in advance in case you disagree with my assessment.
FWIW, for python part:
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-11-29 21:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 17:24 [Xen-devel] [PATCH-for-4.13 v7] Rationalize max_grant_frames and max_maptrack_frames handling Paul Durrant
2019-11-29 17:36 ` Wei Liu
2019-11-29 17:44 ` Wei Liu
2019-11-29 17:53 ` George Dunlap
2019-11-29 18:18 ` Wei Liu
2019-11-29 21:15 ` Marek Marczykowski-Górecki [this message]
2019-11-29 21:42 ` 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=20191129211533.GF5763@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=konrad.wilk@oracle.com \
--cc=pdurrant@amazon.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.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 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.