From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH V4] Switch from select() to poll() in xenconsoled's IO loop Date: Mon, 7 Jan 2013 15:01:48 +0000 Message-ID: <1357570908.13581.9.camel@iceland> References: <1357233257-13918-1-git-send-email-wei.liu2@citrix.com> <1357568895.11865.1.camel@iceland> <50EADE9B.5090109@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50EADE9B.5090109@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mats Petersson Cc: wei.liu2@citrix.com, "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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.