Basant Kukreja wrote: > 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. > > > Basant Unless we can quantify the performance degradation to some actual numbers, we are simply shooting in the air. The alternative is complex , non user friendly and hard to maintain.
thanks sriram
