Re: [PATCH 0/14] fork/exec removal series
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Oct 14, 2007, 02:58 UTC
- Message-ID
- <20071014025857.GQ27899@spearce.org>
- In-Reply-To
- <Pine.LNX.4.64.0710140348550.25221@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 11 quoted lines
> 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.