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

Re: [Xen-devel] [PATCH 2 of 4] x86/mm: Allow to not sleep on mem event ring


  • To: "Tim Deegan" <tim@xxxxxxx>
  • From: "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx>
  • Date: Fri, 17 Feb 2012 08:57:09 -0800
  • Cc: andres@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>, adin@xxxxxxxxxxxxxx
  • Delivery-date: Fri, 17 Feb 2012 16:57:35 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=message-id :in-reply-to:references:date:subject:from:to:cc:reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= lagarcavilla.org; b=NwgXccFBjjN+kzIxqle+/pxexZhsFr7WKYBVwKMiar84 zPI8/u/RR1kTCyZDU2aGTULBOT/rDK4awLm2l30FjzkLH2AwUfr/bXz/rC0ahZMi +kt0g4ZsdklYG3D8INfQVV3yRHQ+GEkzFFMISdK2jsZl3NflSck2gMqlzu8jWro=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

> 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 <andres@xxxxxxxxxxxxxxxx>
>> Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
>
> Hmm.  This interface is getting a bit twisty now, but assuming the
> patches that use it are OK, then Ack.

Another option is to call a ring "best effort", and then the event
producer doesn't have to specify whether sleep is allowable. The event
producer should know, though, whether the ring is best effort. I think
that makes up for a cleaner interface.

Andres
>
> 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®.