On Thu, Aug 23, 2007 at 01:32:39PM +0530, Arvind Srinivasan wrote:
> Basant Kukreja wrote:
> 
> > Note: Redhat/Fedora follows the above approach to have single apr library 
> > which
> > have threads enabled.
> >
> 
> What about the other build artifacts such as apxs, build/*mk etc - are there 
> 2 
> sets (1 for prefork and the other for worker) or just one? i.e. How does an 
> Apache module developer using Redhat/Fedora go about compiling/developing 
> his/her module for prefork vs worker?
There is single set.
As far as apache modules are concerned, they typically doesn't need to care
under which mpm they works. However modules may have to protect their static/
global variable against race conditions. Therefore if some module is written to
work under "prefork" only, he will not care about his global/static variables.
On the other hand, those modules who want themself to work with all mpm uses
locks to avoid race conditions. There is no macro to recognize MPM type (AFAIK).
What module uses is HAS_APR_THREADS.
AFAIK, single apxs should work for both prefork/worker. Redhat/Fedora has
single apxs and that will compile modules with threaded apr (even for prefork)
and those module should work with various apache mpms.
What my concern is that even in prefork, all modules will have code path
with HAS_APR_THREADS=1 which *might* regress the performance.


> The current proposal/plan to ship multiple MPMs of Apache 2.2.x does affect 
> the 
> downstream modules built around Apache both in terms of file layout and the 
> bits that'll be in SXDE.
If it has been decided that there will be a single apr compiled with threaded
support (and hence single set of modules) then the above is true.

Regards,
Basant.


Reply via email to