Subject: Re: [PATCH 0/14] fork/exec removal series

From: "Shawn O. Pearce" <[email-masked]>
Date: Sat, 13 Oct 2007 22:58:57 -0400

Johannes Schindelin <[email-masked]> wrote:
> On Sat, 13 Oct 2007, Shawn O. Pearce wrote:
> 
> > Since builtin-pack-objects now accepts (limited) pthread support, 
> > perhaps this should be implemented in terms of pthread support when 
> > pthreads are available?
> 
> Falling back to fork() when no pthreads are available?  Yes, that makes 
> sense.
> 
> It might also (marginally) speed up operations, since the switches between 
> threads are cheaper than those between processes, right?

Usually.  If we have a large virtual address space (say due to
opening a bunch of packfiles and reading commits out of them into
struct commit* thingies) and the OS does a giant copy of the page
tables during fork() then the pthread creation should be a heck of
a lot cheaper.

But we most definately *must* continue to support fork() for the
async functions.  Its the most common interface available on one
of our biggest platforms (UNIX).

-- 
Shawn.