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: Ping: [Xen-devel] netback data access synchronization question

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: Ping: [Xen-devel] netback data access synchronization question
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 02 Feb 2010 15:45:24 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 02 Feb 2010 07:45:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C78DDB65.8BF1%keir.fraser@xxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C78DD8F9.8B57%keir.fraser@xxxxxxxxxxxxx> <C78DDB65.8BF1%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 02.02.10 14:38 >>>
>Which means, if you want a more useful answer, you'll have to explain the
>potential bug more long-windedly with illustration.

I'll try to: The two tasklets (rx and tx) can run in parallel. If the
sequence of operations is

- netbk_gop_frag() (in the context of the rx tasklet) reads
(for a guest-to-guest transfer) pending_tx_info[] and stores the
respective grant reference as source of the transfer in a "local"
variable
- net_tx_action_dealloc() (in the context of the tx tasklet) grabs the
same grant reference and passes it to GNTTABOP_unmap_grant_ref,
and that hypercall completes
- the guest the grant ref belongs to invalidates the grant
- net_rx_action() passes the now stale grant reference (obtained
in netbk_gop_frag()) to GNTTABOP_copy

Since it is the source domain (of the two guests involved) potentially
revoking the grant before the transfer can complete, it would seem
to me that it can that way cause errors on the receiving side.

Or can all that really only happen when the source guest misbehaves,
in which case receive errors in the other domain are a valid expression
of that fact (with just the ugly side effect of various warning
messages appearing in the hypervisor log)?

Thanks, Jan


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