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

Re: [Xen-devel] xenbus stress testing


  • To: James Harper <james.harper@xxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcvPZwL0wbQaDjbBQuOYlz03kK9mWAAAf4YwAAD7vF8=
  • Thread-topic: [Xen-devel] xenbus stress testing

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.