Nginx - Google Summer of Code ideas

Valery Kholodkov valery+nginxen at grid.net.ru
Fri Mar 13 19:52:47 MSK 2009


----- "Maxim Dounin" <mdounin at mdounin.ru> wrote:

> Hello!
> 
> On Fri, Mar 13, 2009 at 03:36:44PM +0000, Valery Kholodkov wrote:
> 
> > 
> > ----- "Maxim Dounin" <mdounin at mdounin.ru> wrote:
> > 
> > > > > other OSes have something too, but it's anyway will require
> some 
> > > > > non-trivial porting.
> > > > 
> > > > Here I disagree: linux kernel supports notification via eventfd
> > > since 2.6.18. eventfd syscall is available as of glibc 2.8, which
> is a
> > > part of e.g. ubuntu intrepid distribution. 
> > > > 
> > > > Personally I've tested this interface and it looks fine to me.
> > > 
> > > Disagree with what?  I've said there are interfaces, but they 
> > > aren't standard.  You've just added one more example of 
> > > non-standard interface.
> > 
> > I disagree that there is no good interface. I think they are all as
> best as they could be at the moment. After all kqueue notification of
> AIO completion isn't POSIX compliant.
> 
> So it looks like you disagree with yourself, since I've never said 
> that there is no good interface.  :)
> 
> I've said quite a different thing: standard interface as defined 
> by POSIX isn't good.

The only drawback I see is that it doesn't include queuing interface, like epoll. This damages the whole idea.

> FreeBSD interface with AIO notifications via kqueue is good, 
> eventfd under linux probably is good too.  But they are both 
> non-standard (and non-portable).  So nginx have to support many 
> notification interfaces for various OSes.

Well, nginx has to support several asynchronous socket IO interfaces. And since AIO interfaces are parallel to socket IO, this doesn't make things significantly more complicated.

Actually, I have a draft of patch of AIO support for nginx with kqueue notifications, but I don't have FreeBSD box at the moment :(

I may send it to anyone who is interested.

-- 
Regards,
Valery Kholodkov





More information about the nginx mailing list