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

Re: [Xen-devel] [PATCH 0 of 2] Mem event ring management overhaul


  • To: "Olaf Hering" <olaf@xxxxxxxxx>
  • From: "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx>
  • Date: Tue, 6 Dec 2011 09:43:24 -0800
  • Cc: andres@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, tim@xxxxxxx, keir.xen@xxxxxxxxx, adin@xxxxxxxxxxxxxx
  • Delivery-date: Tue, 06 Dec 2011 17:44:34 +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=QYRI9iR0EhtqazY0y+Vw7aOa11pmSaZMzgoUReDHspsc wqVOqJhKKhYZOPrPPWK8Eu6Pj7pvlICrOo6woQP+pQuQ2h3qWvBelJjZ5Y9+PCK9 D0la6v+hOwDnMdHK2kCbpkMojrjDKQdtxGoi53Hv2W00EjiBRMJ0vhau5I8ooww=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

> On Mon, Dec 05, Andres Lagar-Cavilla wrote:
>
>> Ensure no guest events are ever lost in the mem event ring.
>>
>> This is one of two outstanding proposals to solve this issue. One
>> key difference between them being that ours does not necessitate wait
>> queues.
>>
>> Instead, we rely on foreign domain retry (already in place), preempting
>> hypercalls that may cause unbounded guest events (such as
>> decrease_reservation), and ensuring there is always space left in the
>> ring for each guest vcpu to place at least one event.
>
> Thats not enough. Cases like hvm_copy and the emulator do currently no
> retry, instead they get an invalid mfn and crash the guest. Its possible
> to code around that in some places, like shown in the URL below, but
> wouldnt it make sense to just stop execution until the expected
> condition is met?
These things are completely unrelated. *Foreign* domains retry. With our
patch, events caused by the guest itself are guaranteed to go in, no
retry.

The fact that hvm_copy et al. currently crash the guest is independent of
ring management. They crash the guest after placing the event in the ring.
And that's where the wait queues are expected to save the day.

> Its not clear to me how to properly handle a full ring in
> get_gfn_type_access() with your proposal.

If the request comes from a foreign domain, and there is no space in the
ring, ENOENT goes upwards.

If the request comes from the guest itself, and it's p2m_query, no event
needs to be generated.

If the request comes from the guest itself, and it requires
paging_populate (!= p2m_query), the event is guaranteed to be put in the
ring, and then the vcpu goes to sleep.

Easy-peasy
Andres
>
> Olaf
>
> http://old-list-archives.xen.org/archives/html/xen-devel/2011-01/msg01121.html
>



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