> -----Original Message-----
> From: Xen-devel [mailto:[email protected]] On Behalf Of
> Juergen Gross
> Sent: 06 September 2017 09:26
> To: [email protected]
> Cc: Juergen Gross <[email protected]>; [email protected]; Wei Liu
> <[email protected]>; George Dunlap <[email protected]>;
> Andrew Cooper <[email protected]>; Ian Jackson
> <[email protected]>; Tim (Xen.org) <[email protected]>;
> [email protected]
> Subject: [Xen-devel] [PATCH v2 5/8] xen: double default grant frame limit for
> huge hosts
> 
> In case a system has memory above the 16TB boundary double the default
> grant frame number limit per domain. This ensures a pv domain can still
> establish the same number of grants even if it is required to use
> version 2 grants which need twice the space of v1 grants.
> 
> Signed-off-by: Juergen Gross <[email protected]>

Reviewed-by: Paul Durrant <[email protected]>

> ---
>  xen/common/grant_table.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
> index ae5f1262e8..709fd55490 100644
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -3824,8 +3824,15 @@ static int __init gnttab_usage_init(void)
>  {
>      BUILD_BUG_ON(DEFAULT_MAX_MAPTRACK_FRAMES <
> DEFAULT_MAX_NR_GRANT_FRAMES);
> 
> +    /*
> +     * In case grant v2 is required for pv domains to reference any possible
> +     * memory page (i.e. memory is installed above 16TB boundary) double
> the
> +     * grant frame limit. This will allow a guest using v2 grants without
> +     * having to lower the number of usable grants.
> +     */
>      if ( !max_grant_frames )
> -        max_grant_frames = DEFAULT_MAX_NR_GRANT_FRAMES;
> +        max_grant_frames = ((max_page >> 32) ? 2 : 1) *
> +                           DEFAULT_MAX_NR_GRANT_FRAMES;
> 
>      if ( !max_maptrack_frames )
>          max_maptrack_frames = DEFAULT_MAX_MAPTRACK_FRAMES;
> --
> 2.12.3
> 
> 
> _______________________________________________
> Xen-devel mailing list
> [email protected]
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Reply via email to