You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 2000/07/10 04:17:55 UTC

Re: cvs commit: apache-2.0/src/modules/mpm/mpmt Makefile.in

This seems rather backward. If we're moving to "mpmt" and dropping the
others, then why try to pretend they ever exist? The httpd.conf should just
use <IfModule mpmt.c>

If we're going to replace the other MPMs, then truly do it.

If this is a temporary measure, then I can understand, but can we at least
hear "this stuff will disappear in a future incarnation" ?

Cheers,
-g

On Sun, Jul 09, 2000 at 06:54:08PM -0000, rbb@locus.apache.org wrote:
> rbb         00/07/09 11:54:08
> 
>   Modified:    src/modules/mpm config.m4
>                src/modules/mpm/mpmt Makefile.in
>   Log:
>   Fix building the mpmt MPM.  The problem was that IfModule uses the name of
>   the C file to determine if a module is present.  mpmt emulates three
>   different MPMs though.  If the default config file we have sane defaults
>   for each of the three MPMs that mpmt emulates.
>   
>   To fix this, the build process creates a soft link to the original MPM name
>   during the configure process, and the build process actually compiles that
>   file, instead of the original mpmt.c.  This allow the mpmt MPM to work
>   just as well as mpmt_pthread.
>   
>   Revision  Changes    Path
>   1.22      +14 -0     apache-2.0/src/modules/mpm/config.m4
>   
>   Index: config.m4
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/modules/mpm/config.m4,v
>   retrieving revision 1.21
>   retrieving revision 1.22
>   diff -u -r1.21 -r1.22
>   --- config.m4	2000/07/08 14:29:13	1.21
>   +++ config.m4	2000/07/09 18:54:08	1.22
>   @@ -50,10 +50,23 @@
>        AC_CACHE_SAVE
>      fi
>    
>   +dnl The MPM_FAKE_NAME allow the mpmt MPM to emulate all of the MPMs without
>   +dnl Apache actually knowing it.  The problem is IfModule.  IfModule uses
>   +dnl the C file's name to know if the module is loaded.  Without this change
>   +dnl mpmt always shows up as mpmt.c, and we can't distinguish between all
>   +dnl of the emulated MPMs.
>   +dnl
>   +dnl This fixes that by creating a soft link that has the name of the
>   +dnl desired MPM to mpmt.c.  Now, Apache can search for the specified MPM
>   +dnl and actually find it.
>      if test "$MPM_NAME" = "mpmt_pthread" ; then
>        EXTRA_CFLAGS="$EXTRA_CFLAGS -DMPMT_PTHREAD"
>   +    MPM_FAKE_NAME=mpmt_pthread.c
>   +    ln -s mpmt.c modules/mpm/mpmt/mpmt_pthread.c
>      elif test "$MPM_NAME" = "dexter" ; then
>        EXTRA_CFLAGS="$EXTRA_CFLAGS -DDEXTER"
>   +    MPM_FAKE_NAME=dexter.c
>   +    ln -s mpmt.c modules/mpm/mpmt/dexter.c
>      fi
>    
>      if test "$MPM_NAME" = "dexter" -o "$MPM_NAME" = "mpmt_pthread"; then
>   @@ -67,6 +80,7 @@
>    fi
>    
>    APACHE_SUBST(MPM_NAME)
>   +APACHE_SUBST(MPM_FAKE_NAME)
>    MODLIST="$MODLIST mpm_${MPM_NAME}"
>    
>    dnl Check for pthreads and attempt to support it
>   
>   
>   
>   1.2       +3 -1      apache-2.0/src/modules/mpm/mpmt/Makefile.in
>   
>   Index: Makefile.in
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt/Makefile.in,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- Makefile.in	2000/07/07 17:35:43	1.1
>   +++ Makefile.in	2000/07/09 18:54:08	1.2
>   @@ -1,5 +1,7 @@
>    
>   +CLEANFILES = mpmt_pthread.c dexter.c
>   +
>    LTLIBRARY_NAME    = libmpmt.la
>   -LTLIBRARY_SOURCES = mpmt.c scoreboard.c
>   +LTLIBRARY_SOURCES = $(MPM_FAKE_NAME) scoreboard.c
>    
>    include $(top_srcdir)/build/ltlib.mk
>   
>   
>   

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apache-2.0/src/modules/mpm/mpmt Makefile.in

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Ben Laurie wrote:
> 
> Which is interesting, because one of the reasons it became three
> different things was that people objected to having one file that did
> three different things...

I'm glad I'm not the only one who had that thought..
-- 
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>

Re: cvs commit: apache-2.0/src/modules/mpm/mpmt Makefile.in

Posted by Ben Laurie <be...@algroup.co.uk>.
rbb@covalent.net wrote:
> 
> Because they are three different things.  The directives required to make
> the three different modes work properly are different.  I could possibly
> merge some of them together, but definately not immediately.  I don't want
> to make this run-time configurable for the same reasons we aren't making
> MPM's dynamically load-able.  This is one file that is compiled three
> different ways, and those three different compilations have different
> properties.

Which is interesting, because one of the reasons it became three
different things was that people objected to having one file that did
three different things...

One day we'll figure out the right compromise.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

Coming to ApacheCon Europe 2000? http://apachecon.com/

Re: cvs commit: apache-2.0/src/modules/mpm/mpmt Makefile.in

Posted by rb...@covalent.net.
Because they are three different things.  The directives required to make
the three different modes work properly are different.  I could possibly
merge some of them together, but definately not immediately.  I don't want
to make this run-time configurable for the same reasons we aren't making
MPM's dynamically load-able.  This is one file that is compiled three
different ways, and those three different compilations have different
properties.

Ryan

On Mon, 10 Jul 2000, Greg Stein wrote:

> I don't understand why it isn't just the "mpmt" MPM, with some flags to make
> it operate differently (e.g. like the old pthread, dexter, or prefork). Why
> pretend they are three MPMs?
> 
> Cheers,
> -g
> 
> On Sun, Jul 09, 2000 at 07:33:50PM -0700, rbb@covalent.net wrote:
> > On Sun, 9 Jul 2000, Greg Stein wrote:
> > 
> > > This seems rather backward. If we're moving to "mpmt" and dropping the
> > > others, then why try to pretend they ever exist? The httpd.conf should just
> > > use <IfModule mpmt.c>
> > 
> > Because that doesn't solve anything.  Using <IfModule mpmt.c> doesn't
> > distinguish between the three modes.
> > 
> > > If we're going to replace the other MPMs, then truly do it.
> > 
> > We are keeping all three MPMs, we are just combining a lot of the common
> > code.  Since the non-common code relies on static variables that we really
> > don't want to expose, we are pretty much forced to keep them all in the
> > same file.
> > 
> > Unless we define a new directive <IfMPM ...> and allow an MPM to specify
> > it's name, this is the best we get.  Because the only truly sane way to
> > identify a module is by it's filename, we have to fake it with the Unix
> > MPMs.
> > 
> > Please, if you can come up with a better solution, go ahead.  Remember, we
> > are keeping the dexter/mpmt_pthread/prefork names for the configuration.
> > 
> > > If this is a temporary measure, then I can understand, but can we at least
> > > hear "this stuff will disappear in a future incarnation" ?
> > 
> > Nope, because it won't.  This is a combine the common code sort of thing,
> > so I am wiliing to do some ugly things to save a half meg of common code.
> > 
> > Ryan
> > 
> > _______________________________________________________________________________
> > Ryan Bloom                        	rbb@apache.org
> > 406 29th St.
> > San Francisco, CA 94131
> > -------------------------------------------------------------------------------
> 
> -- 
> Greg Stein, http://www.lyra.org/
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/modules/mpm/mpmt Makefile.in

Posted by Greg Stein <gs...@lyra.org>.
I don't understand why it isn't just the "mpmt" MPM, with some flags to make
it operate differently (e.g. like the old pthread, dexter, or prefork). Why
pretend they are three MPMs?

Cheers,
-g

On Sun, Jul 09, 2000 at 07:33:50PM -0700, rbb@covalent.net wrote:
> On Sun, 9 Jul 2000, Greg Stein wrote:
> 
> > This seems rather backward. If we're moving to "mpmt" and dropping the
> > others, then why try to pretend they ever exist? The httpd.conf should just
> > use <IfModule mpmt.c>
> 
> Because that doesn't solve anything.  Using <IfModule mpmt.c> doesn't
> distinguish between the three modes.
> 
> > If we're going to replace the other MPMs, then truly do it.
> 
> We are keeping all three MPMs, we are just combining a lot of the common
> code.  Since the non-common code relies on static variables that we really
> don't want to expose, we are pretty much forced to keep them all in the
> same file.
> 
> Unless we define a new directive <IfMPM ...> and allow an MPM to specify
> it's name, this is the best we get.  Because the only truly sane way to
> identify a module is by it's filename, we have to fake it with the Unix
> MPMs.
> 
> Please, if you can come up with a better solution, go ahead.  Remember, we
> are keeping the dexter/mpmt_pthread/prefork names for the configuration.
> 
> > If this is a temporary measure, then I can understand, but can we at least
> > hear "this stuff will disappear in a future incarnation" ?
> 
> Nope, because it won't.  This is a combine the common code sort of thing,
> so I am wiliing to do some ugly things to save a half meg of common code.
> 
> Ryan
> 
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apache-2.0/src/modules/mpm/mpmt Makefile.in

Posted by rb...@covalent.net.
On Sun, 9 Jul 2000, Greg Stein wrote:

> This seems rather backward. If we're moving to "mpmt" and dropping the
> others, then why try to pretend they ever exist? The httpd.conf should just
> use <IfModule mpmt.c>

Because that doesn't solve anything.  Using <IfModule mpmt.c> doesn't
distinguish between the three modes.

> If we're going to replace the other MPMs, then truly do it.

We are keeping all three MPMs, we are just combining a lot of the common
code.  Since the non-common code relies on static variables that we really
don't want to expose, we are pretty much forced to keep them all in the
same file.

Unless we define a new directive <IfMPM ...> and allow an MPM to specify
it's name, this is the best we get.  Because the only truly sane way to
identify a module is by it's filename, we have to fake it with the Unix
MPMs.

Please, if you can come up with a better solution, go ahead.  Remember, we
are keeping the dexter/mpmt_pthread/prefork names for the configuration.

> If this is a temporary measure, then I can understand, but can we at least
> hear "this stuff will disappear in a future incarnation" ?

Nope, because it won't.  This is a combine the common code sort of thing,
so I am wiliing to do some ugly things to save a half meg of common code.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------