On 22/08/17 14:48, Jan Beulich wrote:
>>>> On 21.08.17 at 20:05, <jgr...@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.

> 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?


Juergen


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

Reply via email to