httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject RE: Patch for listen.c
Date Mon, 04 Nov 2002 13:32:11 GMT

> Jeff Trawick wrote:
> > Randall Stewart <randall@stewart.chicago.il.us> writes:
> >
> >
> >>The idea behind this is that SCTP is automatically enabled if
> >>available... i.e. there is no flag to turn it on/off.. if you say
> >>listen 80
> >>and have sctp.. you get a listener on both TCP and SCTP port 80.
> >>
> >>Now the reason I picked this method is:
> >>
> >>a) A port/socket listening is a small amount of overhead...
> >
> >
> > unfortunately, it can be meaningful overhead, enough so that IMHO it
> > isn't reasonable to enable SCTP automatically
> >
> > when Apache has more than one listening socket, it is forced to poll()
> > in addition to accept(), and the use of poll() prior to accept() means
> > it has to serialize all threads/processes such that only one is in
> > poll() at a time
>
> hmmm so what I think you are saying is that if only one
> port is listened to all children can do a poll() on the sd otherwise
> you must have only one thread to the poll() I guess so it could
> dispatch out the work...
>

If you are only listening to one port, you can can skip the poll() and have all
threads block on the accept().  poll(), unlike accept(), does not work correctly
if you allow multiple threads to call it.

Bill



Mime
View raw message