From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 03 of 12] x86/mm: Add per-page locking for memory sharing, when audits are disabled Date: Thu, 19 Jan 2012 13:02:30 +0000 Message-ID: <20120119130230.GI66164@ocelot.phlegethon.org> References: <11916fe20dd274ff370b.1326682583@xdev.gridcentric.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <11916fe20dd274ff370b.1326682583@xdev.gridcentric.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andres Lagar-Cavilla Cc: xen-devel@lists.xensource.com, ian.campbell@citrix.com, andres@gridcentric.ca, keir.xen@gmail.com, JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org At 21:56 -0500 on 15 Jan (1326664583), Andres Lagar-Cavilla wrote: > @@ -510,26 +684,63 @@ int mem_sharing_share_pages(struct domai > smfn = get_gfn(sd, sgfn, &smfn_type); > cmfn = get_gfn(cd, cgfn, &cmfn_type); > > - ret = XEN_DOMCTL_MEM_SHARING_S_HANDLE_INVALID; > - spage = mem_sharing_lookup(mfn_x(smfn)); > - if ( spage == NULL ) > + /* This tricky business is to avoid two callers deadlocking if > + * grabbing pages in opposite client/source order */ I think you need to delete the XXX comment just above. :) Tim.