On 25/04/2019 16:32, Tamas K Lengyel wrote:
> diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
> index 6faa563167..594de6148f 100644
> --- a/xen/include/asm-x86/mm.h
> +++ b/xen/include/asm-x86/mm.h
> @@ -133,7 +133,10 @@ struct page_info
>           * of sharing share the version they expect to.
>           * This list is allocated and freed when a page is shared/unshared.
>           */
> -        struct page_sharing_info *sharing;
> +        struct {
> +            struct page_sharing_info *info;
> +            rwlock_t lock;
> +        } sharing;
>      };
>  
>      /* Reference count and various PGC_xxx flags and fields. */

I'm afraid this is a no-go, but for some reasons which are rather more
subtle that they appear here.

There is one struct page_info per 4k frame, and you've added an extra 16
bytes, taking it from 32 bytes to 48 bytes.

Other than making it a non-power-of-2 (net diffstat grow/shrink: 256/27
up/down: 7750/-5696 (2054) due to less efficient arithmetic[1]), the
framtable has a fixed virtual size (128G by default), so you've ended up
dropping Xen's memory limit (16TB by default) by 1/3.

~Andrew

[1] The drop is almost all in pdx_group_valid datastructure, which is a
function of the max supported memory limit.

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

Reply via email to