You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Igor Nazarenko <ig...@hotmail.com> on 2003/01/08 22:05:18 UTC

[PATCH] Avoid busy wait in winnt MPM when all workers are busy

The only modification is in
./server/mpm/winnt/child.c

That file hasn't changed between 2.0 and 2.1

This is the first time I'm submitting a patch so please tell me if I'm doing 
something wrong.

Igor

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

Re: [PATCH] Avoid busy wait in winnt MPM when all workers are busy

Posted by Bill Stoddard <bi...@wstoddard.com>.
Finally spending some time reviewing this patch. It has a problem.

Igor Nazarenko wrote:

> +            /* We failed to grab a context off the queue, consider 
> allocating a
> +             * new one out of the child pool. There may be up to 
> ap_threads_per_child
> +             * contexts in the system at once.
> +             * Note: this function assumes that only one thread may call 
> it,
> +             * so the access to num_completion_contexts variable does not
> +             * have to be protected.
> +             */

The server can have multiple accept threads (one for each Listen 
directive), thus mpm_get_completion_context can have multiple threads in 
it at once. num_completion_contexts needs protecting. I basically like 
your patch, but I want to spend some time thinking through potential 
timing windows before committing it.

Bill


RE: [PATCH] Avoid busy wait in winnt MPM when all workers are busy

Posted by Bill Stoddard <bi...@wstoddard.com>.
Thanks, I'll review the patch but it will probably be sometime next week.
Bill

> -----Original Message-----
> From: Igor Nazarenko [mailto:igor_nazarenko@hotmail.com]
> Sent: Wednesday, January 08, 2003 4:05 PM
> To: dev@httpd.apache.org
> Subject: [PATCH] Avoid busy wait in winnt MPM when all workers are busy
> 
> 
> The only modification is in
> ./server/mpm/winnt/child.c
> 
> That file hasn't changed between 2.0 and 2.1
> 
> This is the first time I'm submitting a patch so please tell me if I'm doing 
> something wrong.
> 
> Igor
> 
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
>