WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] yanked share problem

To: "Mark Williamson" <mark.williamson@xxxxxxxxxxxx>, "NAHieu" <nahieu@xxxxxxxxx>
Subject: RE: [Xen-devel] yanked share problem
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Wed, 14 Dec 2005 23:34:05 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "King, Steven R" <steven.r.king@xxxxxxxxx>
Delivery-date: Wed, 14 Dec 2005 15:36:04 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYAu/LRAzBpU1EOSAaIT02hnD7naQABQ2lg
Thread-topic: [Xen-devel] yanked share problem
>From: Mark Williamson
>Sent: 2005年12月14日 22:30
>
>> Could you tell me what happen if the DomU_A crash while DomU_B still
>> accesses the  memory it is granted? And moreover, how can DomU_A knows
>> that his friend has just "died"?
>
>AFAIK, A will be prevented from being fully destroyed until B drops the
>reference to that page of memory.  The page will be around as long as B wants
>it.
>
>Cheers,
>Mark
>

How about B is waiting for A's notification to end reference, but A crashed 
before sending out notification? One immediate example is the shared ring buf 
between backend and frontend. Backend may not access the shared ring buf when A 
is crashed. But that doesn't mean backend won't access that address later since 
that virtual address is legally allocated from linux buddy pool. We need 
provide a way to notify reference side something going abnormally, and let 
reference side to drop reference and release local resource. 

One possible way is to register a grant call back for each driver. When Xen 
detects A crashed, xen notifies registered callback. For example, backend can 
register a callback which check whether any reference on-going. If yes, waiting 
for those reference done. Finally release all references to grant entries of 
crashed domain and also release local resource back to linux and exit the 
driver. After all callbacks are done, Xen then free that machine page.

Thanks
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel