From: Tim Deegan Subject: Re: [PATCH 2 of 4] x86/mm: Allow to not sleep on mem event ring Date: Thu, 16 Feb 2012 16:11:14 +0000 Message-ID: <20120216161114.GF41163@ocelot.phlegethon.org> References: <09746decbd28309ff25c.1329364625@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: <09746decbd28309ff25c.1329364625@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: andres@gridcentric.ca, xen-devel@lists.xensource.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org At 22:57 -0500 on 15 Feb (1329346625), Andres Lagar-Cavilla wrote: > xen/arch/x86/mm/mem_event.c | 5 +++-- > xen/include/asm-x86/mem_event.h | 30 +++++++++++++++++++++++++----- > 2 files changed, 28 insertions(+), 7 deletions(-) > > > Under extreme congestion conditions, generating a mem event may put the vcpu to > sleep on a wait queue if the ring is full. This is generally desirable, although > fairly convoluted to work with, since sleeping on a wait queue requires a > non-atomic context (i.e. no locks held). > > Introduce an allow_sleep flag to make this optional. The API remains such that > all current callers set allow_sleep to true and thus will sleep if necessary. > > The end-use is for cases in which loss of guest mem events is tolerable. One > such consumer to be added later is the unsharing code under ENOMEM conditions. > > Signed-off-by: Andres Lagar-Cavilla > Signed-off-by: Adin Scannell Hmm. This interface is getting a bit twisty now, but assuming the patches that use it are OK, then Ack. Tim.