httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: MPM re-write for network logic
Date Thu, 15 Nov 2001 16:16:02 GMT
What specifically would you like to know. What I posted on the list was sufficient for
Ryan.

Bill
----- Original Message -----
From: "Wilt, Paul" <pwilt@xanedu.com>
To: <dev@httpd.apache.org>
Cc: "'Bill Stoddard'" <bill@wstoddard.com>
Sent: Tuesday, November 13, 2001 4:33 PM
Subject: RE: MPM re-write for network logic


> Bill:
>
> Any chance that you would share that detailed walkthrough with the
> rest of us people?
>
> Paul E Wilt
> Principal Software Engineer
> __________________________________________________________________
> XanEdu, Inc. (division of Proquest Information and Learning)
> http://www.xanedu.com  mailto:pwilt@XanEdu.com
> 300 North Zeeb Rd      Phone: (734) 302-6545  (800) 218-5971 x6545
> Ann Arbor, MI 48106    Fax:   (734) 975-6440
> __________________________________________________________________
>
>
>
> -----Original Message-----
> From: Bill Stoddard [mailto:bill@wstoddard.com]
> Sent: Monday, November 12, 2001 11:18 PM
> To: dev@httpd.apache.org; rbb@covalent.net
> Subject: Re: MPM re-write for network logic
>
>
>
> > On Monday 12 November 2001 07:22 pm, William A. Rowe, Jr. wrote:
> > > From: "Ryan Bloom" <rbb@covalent.net>
> > > Sent: Monday, November 12, 2001 8:55 PM
> > >
> > > > The problem that remains is Windows.  Windows starts the server, and
> > > > creates one thread for each socket that is configured.  That thread
> sits
> > > > in accept, and passes the accepted socket to worker threads.  This
> seems
> > > > like a waste of resources, but I will accept that the Windows experts
> > > > know what they are doing. My problem is that it doesn't really fit the
> > > > model above. I guess that Windows could work by using the first hook
> > > > above, and then looping through the apr_pollfd_t, creating threads
> that
> > > > call the third hook above.
> > >
> > > Uh... no, that's AcceptEx, and it has entirely different mechanics.
> There
> > > will always be data to process when a winsock has accept-ex-ed a socket
> > > (thus the different API.)  Ergo, no thread is woken until it has a job
> to
> > > do.
> >
> > I have a stupid question.  I have been looking at the Windows code, and I
> > can't see where the data that is read by AcceptEx ever gets to the
> processing
> > thread.  Does that data ever get to the thread doing the work?  If so,
> how????
> >
>
> See PostQueuedCompletionStatus() and GetQueuedCompletionStatus().
>
> The worker thread pool blocks on GetQueuedCompletionStatus() in
> winnt_get_connection().
> winnt_accept() accepts connections and calls PostQueuedCompletionSTatus() to
> wake up one
> of the workers blocked on GetQueuedCompletionStatus().
>
> Notice the queue of 'completion contexts' that flow between the two calls.
> And the
> ThreadDispatchIOCP is a Windows "Completion Port" a kernel resident FIFO
> queue of sorts.
>
> Give me a call tomorrow and I'll walk you through it in detail if you like.
>
> Bill
>
> > Ryan
> > ______________________________________________________________
> > Ryan Bloom rbb@apache.org
> > Covalent Technologies rbb@covalent.net
> > --------------------------------------------------------------
> >
>


Mime
View raw message