xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: David Vrabel <david.vrabel@citrix.com>
Cc: Wei Liu <Wei.Liu2@citrix.com>, Jan Beulich <JBeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [RFC] Extending numbers of event channels
Date: Thu, 6 Dec 2012 10:03:08 +0000	[thread overview]
Message-ID: <20121206100308.GE82725@ocelot.phlegethon.org> (raw)
In-Reply-To: <50BDDFF0.6050308@citrix.com>

At 11:35 +0000 on 04 Dec (1354620912), David Vrabel wrote:
> On 03/12/12 20:56, Wei Liu wrote:
> > On Mon, Dec 03, 2012 at 06:52:41PM +0000, David Vrabel wrote:
> >> On 03/12/12 16:29, Wei Liu wrote:
> >>> Hi all
> >>>
> >>> There has been discussion on extending number of event channels back in
> >>> September [0].
> >>
> >> It seems that the decision has been made to go for this N-level
> >> approach.  Were any other methods considered?
> >>
> >> Would a per-VCPU ring of pending events work?  The ABI will be easier to
> >> extend in the future for more event channels.  The guest side code will
> >> be simpler.  It will be easier to fairly service the events as they will
> >> be processed in the order they were raised.
> >>
> >> The complexity would be in ensuring that events were not lost due to
> >> lack of space in the ring.  This may make the ring prohibitively large
> >> or require complex or expensive tracking of pending events inside Xen.
> >>
> > 
> > If I understand correctly, one event will always be queued up for
> > processing in the ring model, will this be too overkill? What if event
> > generation is much faster than processing?
> > 
> > In the current implementation, one event channel can be raised multiple
> > times but it is only processed once.
> 
> There would have to be something in Xen to ensure an event was only
> added to the ring once.  i.e., if it's already in the ring, it doesn't
> get added.  This is the tricky bit and I can't immediately think of how
> this would work.

Well, Xen could keep a bitmap of which events it had inserted in the
ring, and then the guest could clear bits from the bitmap as it serviced
the events... :)

More seriously, though, I prefer the existing bitmap interface.  It
handles masking and merging naturally, and it lets the guest service
events in whatever order it chooses (not having to process 1 word per
event of potentially uninteresting events off the ring to get to the one
it wants).

Tim.

  reply	other threads:[~2012-12-06 10:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 16:29 [RFC] Extending numbers of event channels Wei Liu
2012-12-03 17:35 ` Jan Beulich
2012-12-03 17:52   ` Wei Liu
2012-12-03 17:57     ` Ian Campbell
2012-12-03 18:15       ` Wei Liu
2012-12-03 18:00     ` Jan Beulich
2012-12-03 18:09       ` Wei Liu
2012-12-04  8:05         ` Jan Beulich
2012-12-04  9:30           ` Ian Campbell
2012-12-04  9:37             ` Jan Beulich
2012-12-03 17:43 ` Ian Campbell
2012-12-03 17:48   ` Jan Beulich
2012-12-03 17:50     ` Ian Campbell
2012-12-03 18:52 ` David Vrabel
2012-12-03 19:11   ` Wei Liu
2012-12-03 20:56   ` Wei Liu
2012-12-04 11:35     ` David Vrabel
2012-12-06 10:03       ` Tim Deegan [this message]
2012-12-04 11:29   ` George Dunlap
2012-12-04 13:45     ` Jan Beulich

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=20121206100308.GE82725@ocelot.phlegethon.org \
    --to=tim@xen.org \
    --cc=JBeulich@suse.com \
    --cc=Wei.Liu2@citrix.com \
    --cc=david.vrabel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).