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] new netfront and occasional receive path lockup

To: "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx>
Subject: Re: [Xen-devel] new netfront and occasional receive path lockup
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 10 Sep 2010 12:42:32 +1000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Christophe Saout <christophe@xxxxxxxx>
Delivery-date: Thu, 09 Sep 2010 19:44:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <D5AB6E638E5A3E4B8F4406B113A5A19A2A5ED798@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <1282495384.12843.11.camel@xxxxxxxxxxxxxxxxxxxx> <4C73166D.3030000@xxxxxxxx> <D5AB6E638E5A3E4B8F4406B113A5A19A2A44184D@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20100909185058.GR2804@xxxxxxxxxxx> <4C8981E5.6010000@xxxxxxxx> <D5AB6E638E5A3E4B8F4406B113A5A19A2A5ED71F@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4C8996FE.2040500@xxxxxxxx> <D5AB6E638E5A3E4B8F4406B113A5A19A2A5ED798@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.2
 On 09/10/2010 12:37 PM, Xu, Dongxiao wrote:
>> However, I am concerned about these manipulations of a cross-cpu
>> shared variable without any barriers or other ordering constraints. 
>> Are you sure this code is correct under any reordering (either by the
>> compiler or CPUs); and if the compiler decides to access it more or
>> less often than the source says it should?    
> Do you mean the flag "np->rx.sring->private.netif.smartpoll_active"?
> It is a flag in shared ring structure, Therefore operations towards
> this flag are the same as other component in shared ring, such as
> under spinlock, etc.

Spinlocks are no use for inter-domain synchronization, only within a
domain.  The other ring operations are carefully ordered with
appropriate memory barriers in specific places; that's why I'm a bit
concerned about their absence for the smartpoll_active flag.  Even if
they are not necessary, I'd like to see an analysis as to why.

    J

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