[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 03 of 12] x86/mm: Add per-page locking for memory sharing, when audits are disabled



At 21:56 -0500 on 15 Jan (1326664583), Andres Lagar-Cavilla wrote:
>  xen/arch/x86/mm.c             |   74 +-----------
>  xen/arch/x86/mm/mem_sharing.c |  257 
> ++++++++++++++++++++++++++++++++++++++---
>  xen/arch/x86/mm/mm-locks.h    |   15 +-
>  xen/include/asm-x86/mm.h      |   27 +++-
>  4 files changed, 275 insertions(+), 98 deletions(-)
> 
> 
> With the removal of the hash table, all that is needed now is locking
> of individual shared pages, as new (gfn,domain) pairs are removed or
> added from the list of mappings.
> 
> We recycle PGT_locked and use it to lock individual pages. We ensure deadlock
> is averted by locking pages in increasing order.
> 
> The global lock remains for the benefit of the auditing code, and is
> thus enabled only as a compile-time option.

I think that having the audit-enabled config disable all the
fine-grained locking is asking for heisenbugs.  (But maybe that goes
away in your later RCU patch, which I've yet to read).

Otherwise, looks good.  Oh, and:

> +#if MEM_SHARING_AUDIT
>  /* Page-sharing lock (global) 
>   *
>   * A single global lock that protects the memory-sharing code's
>   * hash tables. */

This comment should probably have been updated in the patch that killed
the hash table. :)

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.