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] xenbus stress testing

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xenbus stress testing
From: Keir Fraser <keir@xxxxxxx>
Date: Fri, 18 Feb 2011 13:08:30 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 18 Feb 2011 05:09:45 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=IQzcsaVEZKavDY9zLG46wVQvkxVO6/AcS+Hqb/bO7ZA=; b=sD8NZ589ackY1A4F2Fbpmj0bpNJ4S2qgPcRGWXxA2qcDwCYnDZGTDOrNGx+LL9pBTC 1o+Nttv78Z9hg/C9rrFdcgYP9XLF5BAmQc0JGqqr341xWUcnx6pBDF3QiIYdPYqA/WF7 iEK0f3E0AltJaUISwyddb0je0K1l8Y2XWHS3Y=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=ZdQJ6mFImQcNflqQXtebwnTkoWga0wlIPknDTr7cCuEyfqnyfP+Hp4TzzEMh4bOT0F ohE9codSw+wtKWoNoZW+jOGh3nrkC37e623rO9n+2mf968j7oCWe0Ei16v32ElloT6pd BSVy2v44YUl9EFy/uhShYTC/LI94ZGeP4Kv8k=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01C55747@trantor>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvPZwL0wbQaDjbBQuOYlz03kK9mWAAAf4YwAAD7vF8=
Thread-topic: [Xen-devel] xenbus stress testing
User-agent: Microsoft-Entourage/12.28.0.101117
On 18/02/2011 12:42, "James Harper" <james.harper@xxxxxxxxxxxxxxxx> wrote:

>> You need to think about memory barriers and/or volatile.  Simply
>> "snapshotting" with an ordinary assignment doesn't work.
>> 
>> I don't know how this is done in Windows but the Linux kernel has a
>> clear explanation of the problem and how it's solved in Linux.  Look
>> in the kernel source tree in Documentation/memory-barriers.txt.
>> 
> 
> I issue a barrier (KeMemoryBarrier() which is a compiler and a memory
> barrier) after copying rsp_prod, eg:
> 
> rsp_prod = ring->rsp_prod;
> KeMemoryBarrier();
> Access the actual ring buffer
> 
> Is there anything else required?

Should be okay. That's basically what all other xenstore clients are doing.

 -- Keir



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