httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <>
Subject Re: [PATCH] Use mutex locks in mod_specweb99.c
Date Thu, 12 Dec 2002 20:34:58 GMT
Sander Temme wrote:
>>I started seeing the following errors in the specweb99 run output, when I
>>use mod_specweb99.c with Apache 2.0.43 and worker MPM. The following patch
>>seems to get rid of the problem. If you're thinking that it may degrade the
>>response - I did not find much difference though.
>>Can somebody please evaluate and let me know if it's okay ?.
> Ha! I have seen this too but have had no time to even think about working on
> it.
> I have one question. Your patch mutexes out the acquisition of the file
> lock. Do these thread mutexes apply only within the process, or across
> processes as well? In the latter case, we could do away with the flock
> entirely if we're in a multithreaded environment. In that case the #ifs
> would move to the _dolock function and we'd have an _unlock function with
> its own #ifs.

I dug into APR locks a little bit.  The apr_global_mutex_* functions turn into 
two separate syscalls, with #if APR_HAS_THREADS around the thread mutexing.  So 
unfortunately they wouldn't save us any syscalls :-( :-(  But they might save a 
little bit of function call overhead.

Another interesting place to look is in srclib/apr/include/arch/unix/apr_private.h .
There are several xxxx_IS_GLOBAL symbols for various serialization mechanisms. 
On my Linux box, all of them are #undef'ed and commented out, including fcntl 
and flock which are the two choices for apr_file_lock.  Madhu, could you take a 
look there and see what you've got?


View raw message