[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |