On Tue, 16 Feb 2010 12:00:01 +0100, [email protected] wrote: > Send libev mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of libev digest..." > > > Today's Topics: > > 1. Re: sub milisec socket server write (Neeraj Rai) > 2. Re: sub milisec socket server write (Marc Lehmann) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 15 Feb 2010 18:18:26 -0800 (PST) > From: Neeraj Rai <[email protected]> > Subject: Re: sub milisec socket server write > To: Marc Lehmann <[email protected]> > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=iso-8859-1 > > > --- On Mon, 2/15/10, Marc Lehmann <[email protected]> wrote: > >> From: Marc Lehmann <[email protected]> >> Subject: Re: sub milisec socket server write >> To: "Neeraj Rai" <[email protected]> >> Cc: [email protected] >> Date: Monday, February 15, 2010, 12:14 AM >> On Sun, Feb 14, 2010 at 05:25:10PM >> -0800, Neeraj Rai <[email protected]> >> wrote: >> > There is a trade off between latency and cpu usage. If >> we sleep 1ms after each queue drain, cpu usage is almost nil >> on no activity, but latency is ~1ms. >> > If sleep is omitted, the cpu usage is 100% crowding >> out other procs on same box. >> > Q1. is this the best way to do this ?
I think that it is possible to use sleep(0) system call. In Linux kernel it helps to shedule the processes queue. Volodymyr Skrypka. _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
