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

Re: [Xen-devel] [PATCH V4] Switch from select() to poll() in xenconsoled's IO loop



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.



_______________________________________________
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®.