xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <Wei.Liu2@citrix.com>
To: Mats Petersson <mats.petersson@citrix.com>
Cc: wei.liu2@citrix.com, "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH V4] Switch from select() to poll() in xenconsoled's IO loop
Date: Mon, 7 Jan 2013 15:01:48 +0000	[thread overview]
Message-ID: <1357570908.13581.9.camel@iceland> (raw)
In-Reply-To: <50EADE9B.5090109@citrix.com>

On Mon, 2013-01-07 at 14:41 +0000, Mats Petersson wrote:

> >                          return;
> > @@ -982,11 +1024,7 @@ void handle_io(void)
> >                  /* Re-calculate any event counter allowances & unblock
> >                     domains with new allowance */
> >                  for (d = dom_head; d; d = d->next) {
> > -                       /* Add 5ms of fuzz since select() often returns
> > -                          a couple of ms sooner than requested. Without
> > -                          the fuzz we typically do an extra spin in select()
> > -                          with a 1/2 ms timeout every other iteration */
> > -                       if ((now+5) > d->next_period) {
> > +                       if (now > d->next_period) {
> Is poll more accurate than select? I would have thought that they were
> based on the same timing, and thus equally "fuzzy"?

Is there any actual proof that the fuzz is needed? Specs of both
select() and poll() don't seem to mention this behaviour at all.

> >   #include "utils.h"
> >
> >   struct xs_handle *xs;
> > +struct pollfd *xs_pollfd;
> I don't see this used outside of io.c  - am I missing something?
> 
> Adding more dependencies between different source files seems
> unnecessary...
> 

Fixed.


Wei.

  reply	other threads:[~2013-01-07 15:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 17:14 [PATCH] Switch to poll in xenconsoled's io loop Wei Liu
2013-01-03 18:22 ` Mats Petersson
2013-01-04 12:30   ` Wei Liu
2013-01-04 15:58 ` [PATCH V2] Switch from select() to poll() in xenconsoled's IO loop Wei Liu
2013-01-04 16:08   ` Ian Campbell
2013-01-04 16:38     ` Wei Liu
2013-01-04 16:51       ` Mats Petersson
2013-01-04 17:17 ` [PATCH V3] " Wei Liu
2013-01-07 10:20   ` Ian Campbell
2013-01-07 12:12     ` Wei Liu
2013-01-07 12:16       ` Ian Campbell
2013-01-07 14:28 ` [PATCH V4] " Wei Liu
2013-01-07 14:39   ` Ian Campbell
2013-01-07 14:44     ` Wei Liu
2013-01-07 14:52     ` Ian Jackson
2013-01-07 14:41   ` Mats Petersson
2013-01-07 15:01     ` Wei Liu [this message]
2013-01-07 15:06       ` Mats Petersson
2013-01-07 15:17         ` Ian Campbell
2013-01-07 15:16       ` Ian Campbell
2013-01-07 15:24         ` Wei Liu

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=1357570908.13581.9.camel@iceland \
    --to=wei.liu2@citrix.com \
    --cc=mats.petersson@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).