All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Xen-devel <xen-devel@lists.xen.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>, David Scott <dave@recoil.org>
Subject: Re: [PATCH RFC] tools/ocaml/xb: Correct calculations of data/space the ring
Date: Wed, 28 Oct 2015 17:14:24 +0000	[thread overview]
Message-ID: <56310270.3050707@citrix.com> (raw)
In-Reply-To: <20151028165625.GI2924@var.bordeaux.inria.fr>

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

      reply	other threads:[~2015-10-28 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 16:05 [PATCH RFC] tools/ocaml/xb: Correct calculations of data/space the ring Andrew Cooper
2015-10-28 16:18 ` Samuel Thibault
2015-10-28 16:43   ` Andrew Cooper
2015-10-28 16:56     ` Samuel Thibault
2015-10-28 17:14       ` Andrew Cooper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56310270.3050707@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dave@recoil.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.