httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
Subject Re: mutex method configuration cleanup for 2.4
Date Thu, 19 Nov 2009 09:23:56 GMT
On Wed, Nov 18, 2009 at 01:18:55PM -0500, Jeff Trawick wrote:
> A. simplistic goal: Just make it simple for modules with no special
> issues or love of complexity.  Provide these directives to set global
> defaults for modules that have been modified to query them:
> use MutexMethod and MutexFileDir to configure method and lock location
> globally or for a specific mutex use
> MutexMethod method-keyword     # "none" not supported as global default
> MutexFileDir /var/httpd/locks
> Modules call ap_global_mutex_method() and ap_global_mutex_file_dir()
> to retrieve that information and use in their APR calls.
> b. more complex goal: Try to meet requirements of more complex (or
> configurable) modules to get rid of some of the varying , complex
> mplementations we already have, as well as handle the simple use.  A
> rough sketch is shown below:

Yes!  I've looked into doing something like this before and I thought a 
single "Mutex" directive would suffice:

Mutex {default,rewrite-map,...} {none,sysvsem,fcntl:/blah}

where the 3rd arg is parsed by ap_parse_mutex().

> We could require modules that use the API to make this call in
> pre-config so that the mutex name in the config file can be checked,
> as well as allow the module to indicate whether or not
> MutexMethod=none is supported for that mutex:
> ap_global_mutex_register(pconf, "rewrite-map", flags);

Yes, definitely a good idea.

> --/--
> This should be good enough to get rid of AcceptMutex, LockFile, and
> the directives for SSL's two global mutexes.  (If it won't be, there's
> no use in going for the more complicated goal.)

Yup, definitely.

Regards, Joe

View raw message