apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject [PATCH] Switch to pthread as the default interprocess lock...
Date Sat, 22 Sep 2001 19:25:58 GMT
I've brought this up before and I'll bring it up again.  =-)

Ian has seen about a ~60rps improvement using AcceptMutex pthread
versus fcntl() on Solaris with httpd.  Also, fcntl has scalability 
issues from what I can tell on Solaris (as described in STATUS) 
that cause fatal errors in httpd.
  
I know that the AIX guys use pthread as well.

Is there any platform that meets the criteria for our pthread
interprocess implementation where it is *not* better than fcntl()?

If there is a problematic platform, then I'd like to set Solaris 
to use pthread by default.  (I think we can define apr_lock_method.) 
-- justin

Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.366
diff -u -r1.366 configure.in
--- configure.in	2001/09/22 19:10:18	1.366
+++ configure.in	2001/09/22 19:11:41
@@ -1126,13 +1126,13 @@
             APR_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()]))
 APR_IFALLYES(func:flock define:LOCK_EX,
             APR_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()]))
+APR_IFALLYES(header:fcntl.h define:F_SETLK,
+            APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()]))
 # note: the current APR use of shared mutex requires /dev/zero
 APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
             func:pthread_mutexattr_setpshared dnl
             file:/dev/zero,
             APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex]))
-APR_IFALLYES(header:fcntl.h define:F_SETLK,
-            APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()]))
 if test "x$apr_lock_method" != "x"; then
     APR_DECISION_FORCE($apr_lock_method)
 fi


Mime
View raw message