[PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

Xin LI-5
Dear folks,

Here is a patchset that taught inetd(8) about kqueue, and some other
cleanups that raises WARNS level from 2 to 3, etc.

http://people.freebsd.org/~delphij/for_review/patch-inetd-kqueue

The kqueue part was a continuation of jmg@'s patchset.

Thanks in advance!

Cheers,

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

Maxim Konovalov-2
On Thu, 10 Nov 2005, 11:43+0800, Xin LI wrote:

> Dear folks,
>
> Here is a patchset that taught inetd(8) about kqueue, and some other
> cleanups that raises WARNS level from 2 to 3, etc.
>
> http://people.freebsd.org/~delphij/for_review/patch-inetd-kqueue
>
> The kqueue part was a continuation of jmg@'s patchset.

Can I ask: why?

--
Maxim Konovalov
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

Xin LI-5
On 11/10/05, Maxim Konovalov <[hidden email]> wrote:
[...]
> Can I ask: why?

My intention is to give kqueue more exposure.

Cheers,

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

John-Mark Gurney
In reply to this post by Maxim Konovalov-2
Maxim Konovalov wrote this message on Thu, Nov 10, 2005 at 17:27 +0300:

> On Thu, 10 Nov 2005, 11:43+0800, Xin LI wrote:
>
> > Dear folks,
> >
> > Here is a patchset that taught inetd(8) about kqueue, and some other
> > cleanups that raises WARNS level from 2 to 3, etc.
> >
> > http://people.freebsd.org/~delphij/for_review/patch-inetd-kqueue
> >
> > 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...

Part of the reason I never committed it was that I did most of my work
on 3.x at the time, and I had serious tcp connection rate issues with
4.x (-current) at the time, and people wanted benchmarks, but w/ 4.x,
I couldn't get more than a hundred connections per second, while my
3.x box could do thousands...

--
  John-Mark Gurney Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

Bruce M Simpson
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
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

Antony Mawer-4
On 12/11/2005 1:04 AM, Bruce M Simpson wrote:
> 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.

While on the topic of inetd and deviating from the other BSDs, I noticed
when playing with pf that OpenBSD has the ability to bind services to
specific interfaces in the inetd.conf file. Is there any interest in
bringing this capability across to the FreeBSD inetd?

I noticed the OpenBSD PR database suggests this came from NetBSD:

http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?numbers=175&full=yes

>>Fix:
> re-import the code from NetBSD or elsewhere.

Though I haven't delved into this further. Is anyone else interested in
seeing this imported? If no one else takes up the challenge I might have
a look in a couple of weeks time, although at the moment I'm suffering
from ENOTIME.

Cheers
Antony

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH FOR REVIEW] kqueue'ify inetd(8) and several other cleanups

Xin LI-5
On 11/12/05, Antony Mawer <[hidden email]> wrote:
> On 12/11/2005 1:04 AM, Bruce M Simpson wrote:
> While on the topic of inetd and deviating from the other BSDs, I noticed
> when playing with pf that OpenBSD has the ability to bind services to
> specific interfaces in the inetd.conf file. Is there any interest in
> bringing this capability across to the FreeBSD inetd?
>
> I noticed the OpenBSD PR database suggests this came from NetBSD:

Yes, that was in my TODO list, too.  Personally I'd prefer OpenBSD's
version, however, the change is not just to import their changes, as
we already did many changes against inetd(8), which made simple
re-import impractical.

Cheers,
--
Xin LI <[hidden email]> http://www.delphij.net

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"