Subject: Re: vfork vs. fork (was Re: popen reentrant (was Re: SA/pthread and
To: Frederick Bruckman <fredb@immanent.net>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 09/14/2003 19:37:18
Thus spake Frederick Bruckman ("FB> ") sometime Today...

FB> I hate to cloud a clear-cut ideological issue with facts, but that
FB> isn't what mkb said AT ALL. It's up to 50% if you do nothing but
FB> execute "/bin/true". In a more practical situation, others have stated
FB> that it shaves a few minutes of off a several hours build. That's a
FB> little different.

:-)

Actually, I was trying to take into account the 50% down to 20% on NetBSD;
on other platforms, it might not be as big.  Sorry for the confusion.

Even if it drops to 10% for building vs. 50% for "doing nothing", that's
still six minutes out of an hour; someone else reported gaining several
minutes out of a several * N minute toolchain build.  That's substantial.
Make does a LOT of fork()/exec() stuff (which, I seem to remember of late,
has been redone with vfork()/exec() (or did I misread that?)), so it wins,
"even if you are doing something else" (such as compiling, linking,
etc...).

In any case, I think it's been shown to hold a substantial improvement
-- substantial enough not to have been rid of it by now.

If there's a better way to do this, bring it on.  This is certainly more
worthwhile than screwing the mud over whether PAM is better (or whatever)
than BSD Auth.  And no, I'm not trying to be snide, here -- I'm genuinely
interested!  Better fork/exec mechanisms?  Way cool!

				--*greywolf;
--
NetBSD. Not Guano.