On Tue, Jul 13, 2010 at 01:30:36PM -0500, Nicolas Williams wrote: > On Mon, Jul 12, 2010 at 02:26:45PM -0700, Bart Smaalders wrote: > > The overhead cost of a system call is about the same as a L3 cache miss: > > of order 150 ns. Given the general expense in creating a new process by > > any means, this would not be my first place to look for performance > > wins. > > But the overhead of vfork() is probably much higher when the parent has > multiple threads, since they must all get stopped first, and then later > they must all be made runnable again. Java, Firefox, Thunderbird, all > come to mind as programs that might benefit from a native posix_spawn(2), > but first we need to see them using posix_spawn(3C).
Since you're the third person to assert that the overhead of stopping lwps is prohibitive, would you please explain how it's possible to safely fork a process if all of the lwps are still running? The vfork[x](2) code that's in posix_spawn right now already sets the isfork1 bit, which tells cfork to be less restrictive about just where exactly the process is stopped. Correctness > performance. -j _______________________________________________ on-discuss mailing list on-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/on-discuss