From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 4 of 5] Re-order calls to put_gfn() around wait queu invocations Date: Thu, 2 Feb 2012 13:26:27 +0000 Message-ID: <20120202132627.GN48883@ocelot.phlegethon.org> References: <211872232129d7c6f4d0.1328126168@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: <211872232129d7c6f4d0.1328126168@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: george.dunlap@eu.citrix.com, andres@gridcentric.ca, xen-devel@lists.xensource.com, keir.xen@gmail.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org At 14:56 -0500 on 01 Feb (1328108168), Andres Lagar-Cavilla wrote: > xen/arch/x86/hvm/emulate.c | 2 +- > xen/arch/x86/hvm/hvm.c | 25 +++++++++++++------ > xen/arch/x86/mm.c | 10 +++--- > xen/arch/x86/mm/guest_walk.c | 2 +- > xen/arch/x86/mm/hap/guest_walk.c | 6 +--- > xen/arch/x86/mm/mem_access.c | 10 +++++++ > xen/arch/x86/mm/mem_event.c | 5 +++ > xen/arch/x86/mm/p2m.c | 52 ++++++++++++++++++++++----------------- > xen/common/grant_table.c | 2 +- > xen/common/memory.c | 2 +- > xen/include/asm-x86/mem_access.h | 1 + > xen/include/asm-x86/mem_event.h | 3 ++ > xen/include/asm-x86/p2m.h | 6 +++- > 13 files changed, 80 insertions(+), 46 deletions(-) > > > Since we use wait queues to handle potential ring congestion cases, > code paths that try to generate a mem event while holding a gfn lock > would go to sleep in non-preemptible mode. > > Most such code paths can be fixed by simply postponing event generation until > locks are released. > > Signed-off-by: Adin Scannell > Signed-off-by: Andres Lagar-Cavilla Looks OK, once the preceding patches are sorted out. If you add some comments to p2m_mem_access_check() describing its new argument and what the caller's supposed to do about it, you can put my Ack on this next time. Cheers, Tim.