xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Juergen Gross' <jgross@suse.com>, 'Jan Beulich' <JBeulich@suse.com>
Cc: "sstabellini@kernel.org" <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH 0/5] xen: better grant v2 support
Date: Wed, 23 Aug 2017 09:28:29 +0000	[thread overview]
Message-ID: <f79288ebfeb2478f9e3bd7b11804328d@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <5b9798b0-2ff3-5a7f-81bb-903c0b94d3eb@suse.com>

> -----Original Message-----
> From: Juergen Gross [mailto:jgross@suse.com]
> Sent: 23 August 2017 10:23
> To: Paul Durrant <Paul.Durrant@citrix.com>; 'Jan Beulich'
> <JBeulich@suse.com>
> Cc: Tim (Xen.org) <tim@xen.org>; sstabellini@kernel.org; Wei Liu
> <wei.liu2@citrix.com>; George Dunlap <George.Dunlap@citrix.com>;
> Andrew Cooper <Andrew.Cooper3@citrix.com>; Ian Jackson
> <Ian.Jackson@citrix.com>; xen-devel@lists.xen.org
> Subject: Re: [Xen-devel] [PATCH 0/5] xen: better grant v2 support
> 
> On 23/08/17 10:47, Paul Durrant wrote:
> >> -----Original Message-----
> >> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of
> Jan
> >> Beulich
> >> Sent: 23 August 2017 09:36
> >> To: Juergen Gross <jgross@suse.com>
> >> Cc: Tim (Xen.org) <tim@xen.org>; sstabellini@kernel.org; Wei Liu
> >> <wei.liu2@citrix.com>; George Dunlap <George.Dunlap@citrix.com>;
> >> Andrew Cooper <Andrew.Cooper3@citrix.com>; Ian Jackson
> >> <Ian.Jackson@citrix.com>; xen-devel@lists.xen.org
> >> Subject: Re: [Xen-devel] [PATCH 0/5] xen: better grant v2 support
> >>
> >>>>> On 23.08.17 at 09:49, <jgross@suse.com> wrote:
> >>> On 22/08/17 14:48, Jan Beulich wrote:
> >>>>>>> On 21.08.17 at 20:05, <jgross@suse.com> wrote:
> >>>>> Currently Linux has no support for grant v2 as this would reduce the
> >>>>> maximum number of active grants by a factor of 2 compared to v1,
> >>>>> because the number of possible grants are limited by the allowed
> >> number
> >>>>> of grant frames and grant entries of v2 need twice as much bytes as
> >>>>> those of v1.
> >>>>>
> >>>>> Unfortunately grant v2 is the only way to support either guests with
> >>>>> more than 16TB memory size or PV guests with memory above the
> 16TB
> >>>>> border, as grant v1 limits the frame number to be 32 bits wide.
> >>>>>
> >>>>> In order to remove the disadvantage of grant v2 this patch series
> >>>>> enables configuring different maximum grant frame numbers for v1
> and
> >>>>> v2.
> >>>>
> >>>> But that does imply higher memory footprint of such a guest in Xen,
> >>>> doesn't it?
> >>>
> >>> With current defaults this would need up to 128kB more for a guest
> using
> >>> v2 grants.
> >>
> >> At least in an auto-ballooned setup this may make the difference
> >> between a guest being able or failing to start.
> >>
> >>>> The limit, after all, is there to bound resource use of
> >>>> DomU-s.  I wonder whether we shouldn't make any such increase
> >>>> dependent on first putting in place proper accounting of the memory
> >>>> used for individual domains.
> >>>
> >>> So you would want to have a way to count pages (or bytes?) allocated
> for
> >>> hypervisor internal needs on a per-domain basis, right?
> >>>
> >>> Would that be additional to struct domain -> xenheap_pages or would
> you
> >>> want to merge the new counter into it? I guess a new field would be
> >>> required in order to avoid counting some data twice.
> >>>
> >>> Do you have an idea what to do with that value? Do you want to expose
> it
> >>> to the user (dom0 admin), or should it be used just inside the
> >>> hypervisor and e.g. printed by a debug key handler?
> >>>
> >>> Do you want an additional set of allocating functions doing the
> >>> accounting, or should the existing functions be used with an additional
> >>> domain pointer, or should the caller be responsible doing the additional
> >>> accounting?
> >>>
> >>> Do you want an all-or-nothing approach or a gradual move to add the
> new
> >>> accounting step by step?
> >>
> >> We've been vaguely discussing this in the past on a few occasions.
> >> My personal thinking is that the "memory=" setting in a guest config
> >> really ought to express all the memory associated with a guest. But
> >> of course there'll be problems with us starting to do so, and that's
> >> beyond people observing less memory in their guests. Switching to
> >> such a full accounting model will require some careful thought (and
> >> discussion up front). Hence I've only said "I wonder whether", i.e.
> >> I don't mean to make this a strict prerequisite to the proposed
> >> changes here. I'd be in particular interested to hear opinions of a
> >> few other people.
> >>
> >
> > Making a the number of grant frames a per-vm-configurable quantity
> would seem like a reasonable first step. I'm not convinced of the need for
> separate v1 and v2 limits if this were the case.
> 
> Really? I don't think so. I believe the default should be to allow the
> same number of grants regardless whether they are v1 or v2. Having to
> modify the guest config to achieve this isn't good practice IMO.
>

In that case I guess we should have per-vm config for the number of grants that the guest is allowed (since the admin should not really have to know about then nature of v1 or v2) and we'd always need to reserve sufficient pages to cover v2 even if v1 is being used (unless we also have a way to disallow use of v2 on a per-guest basis).

  Paul
 
> 
> Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-08-23  9:28 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 18:05 [PATCH 0/5] xen: better grant v2 support Juergen Gross
2017-08-21 18:05 ` [PATCH 1/5] xen: remove deprecated boot parameter gnttab_max_nr_frames Juergen Gross
2017-08-24 14:08   ` Jan Beulich
2017-08-21 18:05 ` [PATCH 2/5] xen: move XENMAPSPACE_grant_table code into grant_table.c Juergen Gross
2017-08-24 14:11   ` Jan Beulich
2017-08-24 16:12   ` Julien Grall
2017-08-25  6:58     ` Juergen Gross
2017-08-21 18:05 ` [PATCH 3/5] xen: clean up grant_table.h Juergen Gross
2017-08-24 14:17   ` Jan Beulich
     [not found]   ` <599EFC2B020000780017345D@suse.com>
2017-08-24 14:28     ` Juergen Gross
2017-08-21 18:05 ` [PATCH 4/5] xen: support different gnttab_max_frames for grant v1 and v2 Juergen Gross
2017-08-24 14:21   ` Jan Beulich
     [not found]   ` <599EFD260200007800173471@suse.com>
2017-08-24 14:54     ` Juergen Gross
2017-08-24 15:01       ` Jan Beulich
     [not found]       ` <599F065D0200007800173568@suse.com>
2017-08-24 15:15         ` Juergen Gross
2017-08-21 18:05 ` [PATCH 5/5] xen: add new hypercall to get grant table limits Juergen Gross
2017-08-24 14:28   ` Jan Beulich
     [not found]   ` <599EFEA302000078001734B4@suse.com>
2017-08-24 14:48     ` Juergen Gross
2017-08-24 15:02       ` Juergen Gross
2017-08-24 15:04       ` Jan Beulich
     [not found]       ` <599F070B0200007800173599@suse.com>
2017-08-24 15:13         ` Juergen Gross
2017-08-24 15:20           ` Jan Beulich
     [not found]           ` <599F0AF20200007800173601@suse.com>
2017-08-25 11:40             ` Juergen Gross
2017-08-25 11:58               ` Jan Beulich
     [not found]               ` <59A02D060200007800173BBD@suse.com>
2017-08-25 12:03                 ` Juergen Gross
2017-08-25 12:23                   ` Jan Beulich
2017-08-22 12:48 ` [PATCH 0/5] xen: better grant v2 support Jan Beulich
     [not found] ` <599C44470200007800172030@suse.com>
2017-08-23  7:49   ` Juergen Gross
2017-08-23  8:36     ` Jan Beulich
2017-08-23  8:47       ` Paul Durrant
2017-08-23  9:23         ` Juergen Gross
2017-08-23  9:28           ` Paul Durrant [this message]
2017-08-23 10:09             ` Juergen Gross
2017-08-23  9:43           ` Jan Beulich
     [not found]           ` <599D6A4802000078001726D1@suse.com>
2017-08-23 10:04             ` Juergen Gross
     [not found]     ` <599D5A9F02000078001725BF@suse.com>
2017-08-23  9:19       ` Juergen Gross
2017-08-23  9:41         ` Jan Beulich
     [not found]         ` <599D69F602000078001726CE@suse.com>
2017-08-23 10:57           ` Juergen Gross

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=f79288ebfeb2478f9e3bd7b11804328d@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --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 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).