Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups
From: Bruce M Simpson (bms_at_spc.org)
Date: 11/11/05
- Previous message: John-Mark Gurney: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- In reply to: John-Mark Gurney: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- Next in thread: Antony Mawer: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- Reply: Antony Mawer: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 11 Nov 2005 14:04:24 +0000 To: Maxim Konovalov <maxim@macomnet.ru>, Xin LI <delphij@gmail.com>, delphij@freebsd.org, freebsd-arch@freebsd.org
On Thu, Nov 10, 2005 at 12:48:49PM -0800, John-Mark Gurney wrote:
> > > Here is a patchset that taught inetd(8) about kqueue, and some other
> > > cleanups that raises WARNS level from 2 to 3, etc.
> > > The kqueue part was a continuation of jmg@'s patchset.
> > Can I ask: why?
> Or to ask a different question, why continue to use select? When I
> originally did the patch for inetd, I was VERY surprised at how little
> of the logic I had to change to make it use kqueue...
I'm ambivalent about the change. On one hand, more exposure for kqueue
considered a good thing. On the other, this means change in inetd which
causes it to deviate from common BSD -- although I think we're happy for
inetd to deviate because we already have special cases for IPSEC in there,
which is actually quite cool.
On a slightly different note, writing a BSD-only routing daemon with
kqueue is quite easy -- it readily facilitates event driven programming
and explicit co-routines.
If you can divide your program up into logical event-driven steps, whilst
preserving the state you need, kqueue makes dispatch more simple. select()
alone involves copying and maintenance of multiple fd_sets, as well as
converting the results you get back into things which make sense.
What I'd like to see from someone with free time on their hands is to look
at how kqueue might be used within XORP, which has used a select() driven
event loop for far too long: http://www.xorp.org/
Regards,
BMS
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: John-Mark Gurney: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- In reply to: John-Mark Gurney: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- Next in thread: Antony Mawer: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- Reply: Antony Mawer: "Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]