|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 03 of 18] x86/mm: Eliminate hash table in sharing code as index of shared mfns
At 02:47 -0500 on 08 Dec (1323312438), Andres Lagar-Cavilla wrote:
> xen/arch/x86/mm/mem_sharing.c | 526
> +++++++++++++++++++------------------
> xen/include/asm-x86/mem_sharing.h | 15 +-
> xen/include/asm-x86/mm.h | 11 +-
> xen/include/public/domctl.h | 3 +
> 4 files changed, 296 insertions(+), 259 deletions(-)
>
>
> The hashtable mechanism used by the sharing code is a bit odd. It seems
> unnecessary and adds complexity. Instead, we replace this by storing a list
> head directly in the page info for the case when the page is shared. This
> does
> not add any extra space to the page_info and serves to remove significant
> complexity from sharing.
>
> Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
> Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
I like the look of this but I won't apply until Olaf is happy with the
interface changes.
One nit:
> diff -r 61da3fc46f06 -r 3038770886aa xen/include/asm-x86/mem_sharing.h
> --- a/xen/include/asm-x86/mem_sharing.h
> +++ b/xen/include/asm-x86/mem_sharing.h
> @@ -22,13 +22,23 @@
> #ifndef __MEM_SHARING_H__
> #define __MEM_SHARING_H__
>
> +#include <public/domctl.h>
> +
> +typedef uint64_t shr_handle_t;
> +
> +struct page_sharing_info
> +{
> + struct page_info *pg; /* Back pointer to the page. */
> + shr_handle_t handle; /* Globally unique version / handle. */
> + struct list_head entry; /* List of all shared pages (entry). */
IIUC this list is only used if the sharing audit code is anabled, so
it should probably be appropritaely #ifdeffed out to save space in the
non-audit case.
Cheers,
Tim.
> + struct list_head gfns; /* List of domains and gfns for this page
> (head). */
> +};
> +
> #ifdef __x86_64__
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |