httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: mutex method configuration cleanup for 2.4
Date Thu, 19 Nov 2009 12:03:04 GMT
On Thu, Nov 19, 2009 at 6:47 AM, Jeff Trawick <trawick@gmail.com> wrote:
> On Thu, Nov 19, 2009 at 4:23 AM, Joe Orton <jorton@redhat.com> wrote:
>> 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().
>
> "blah" always has to point to a dir, and the lock identifier is used
> when constructing the basename.
>
> --/--
>
> I envisioned the conf (perhaps a vendor conf) declaring something like
>
> MutexDir logs
> or
> MutexDir /var/apache2/2.2/locks
>
> The admin can then adjust the mutex methods as necessary and not worry
> about paths to locks.  Or change MutexDir as necessary and not affect
> the mutex methods at all.  MutexDir can be used as a preventative
> measure even if no file-based mutexes are currently configured.
>
> With the single directive solution, I don't see a way to declare "if
> lock files must be used, put them here."

I sure hope there's no reason to put different mutexes on different
filesystems...

Mime
View raw message