httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <>
Subject RE: [PATCH] Use mutex locks in mod_specweb99.c
Date Thu, 12 Dec 2002 22:24:21 GMT

>-----Original Message-----
>From: Greg Ames []

>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.

Interesting.. I don't see it that way (atleast for HP-UX).. On HP-UX,
replacing a file lock with global mutex lock definitely saves a lot of time
(because of the absence of inode lookups, file-system locks etc.).. I'm
expecting atleast a 5% increase..

BTW, I had a doubt regarding the global_mutex_lock..
as per my understanding :
thread_mutex MEANS the mutex is local to the process
proc_mutex MEANS the mutex is global to the system (shared mutex)
global_mutex_lock () is trying to lock the shared mutex (proc_mutex).

Given the above, I don't understand why we need to lock the local
thread_mutex before trying to acquire the proc_mutex. Am I missing something
here ?.


View raw message