All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: FIFO-based event channel ABI design (draft B)
Date: Fri, 15 Feb 2013 15:05:38 +0000	[thread overview]
Message-ID: <511E5CD202000078000BEC4F@nat28.tlf.novell.com> (raw)
In-Reply-To: <511E46FD.3010605@citrix.com>

>>> On 15.02.13 at 15:32, David Vrabel <david.vrabel@citrix.com> wrote:
> ### Control Block
> 
> ![\label{fig_control-block}Control Block](control-block.pdf)
> 
> The READY field contains a bit for each priority's queue.  A set bit
> indicates that there are events pending on that queue.  A queue's
> ready bit is set by Xen when an event is placed on an empty queue and
> cleared by the guest when it empties the queue.
> 
> There are N HEAD and TAIL indexes, one for each priority.
> 
> The HEAD index is the first event in the queue or zero if the queue is
> empty.  HEAD is set by the guest as it consumes events and only set by
> Xen when adding an event to an empty queue.
> 
> The TAIL index is the last event in the queue.  It is undefined if the
> queue is empty.  TAIL is only set by Xen.

One thing I continue to wonder is why tail it part of the control
block at all - from all I can tell, it's not consumed by the guest (end
of list being indicated by a zero LINK field), and hence is an
implementation detail of the hypervisor. And given that the
hypervisor reads that field, not exposing the field also avoids the
need to validate is each time it gets read from the control block.

Additionally, I think the number of significant bits of the LINK field
should actually be obtained from the hypervisor, rather than being
baked at 17 (for the time being). This again is an implementation
detail (and the value could easily be command line controllable).

Jan

  reply	other threads:[~2013-02-15 15:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 14:32 FIFO-based event channel ABI design (draft B) David Vrabel
2013-02-15 15:05 ` Jan Beulich [this message]
2013-02-15 15:17   ` David Vrabel
2013-02-15 15:36     ` Jan Beulich
2013-02-15 18:19 ` Wei Liu
2013-02-15 18:46   ` David Vrabel
2013-02-15 19:04     ` Wei Liu
2013-02-18  8:10     ` Jan Beulich
2013-02-18 15:19 ` Ian Campbell
2013-02-18 20:16   ` David Vrabel
2013-02-18 20:50     ` Wei Liu
2013-02-18 20:21   ` Keir Fraser
2013-02-19 18:39 ` Ian Jackson

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=511E5CD202000078000BEC4F@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=david.vrabel@citrix.com \
    --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.