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

Re: [Xen-devel] [PATCH RFC] tools/ocaml/xb: Correct calculations of data/space the ring



On 28/10/15 16:56, Samuel Thibault wrote:
> Andrew Cooper, le Wed 28 Oct 2015 16:43:54 +0000, a écrit :
>>> IIRC the test is not bogus even when prod wraps around, (prod - cons)
>>> will still correctly be the difference between both, modulo 2^32.
>> (prod - cons) >= XENSTORE_RING_SIZE checks for the prod getting more
>> than a ring's worth ahead of cons.
>>
>> (cons - prod) < -XENSTORE_RING_SIZE is supposed to check for cons
>> getting ahead of prod
> If cons is a ahead of prod, prod-cons is way bigger than
> XENSTORE_RING_SIZE, and thus the first test already catches that. In the
> 2^32 wrap case, the difference will still be correct.

Hmm - of course.  I will scale back the adjustments to the error handling.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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