From: Shawn O. Pearce Date: Sun, 14 Oct 2007 02:58:57 GMT Subject: Re: [PATCH 0/14] fork/exec removal series Message-ID: <20071014025857.GQ27899@spearce.org> In-Reply-To: Johannes Schindelin 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.