lkml.org 
[lkml]   [1999]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Porting vfork()
On Fri, Jan 08, 1999 at 01:08:22PM -0800, Linus Torvalds wrote:
>
> On Fri, 8 Jan 1999 kernel@draper.net wrote:
> >
> > I have checked vfork() behavior on HP-UX (B.10.20), AIX (4.2),
> > FreeBSD (2.2.8), and SunOS (5.5.1). Of these in only Solaris and HP-UX
> > does the child share memory with the calling process.
>
> Yes. That is because vfork() is actually extremely nasty to handle with
> some VM implementations, and most UNIXes felt that they don't actually
> want to support it in the future. In many cases they have already dropped
> support for it as you noticed.
>
> I used to think that vfork() was an abomination too.
>
> HOWEVER: vfork() _is_ useful, and allows a much lower latency
> implementation of a "spawn()" like thing - with none of the disadvantages
> of "spawn()" (spawn is a spawn of hell, and much less flexible than the
> combination of vfork()+exec()).
>
> AND vfork() is actually very easy to implement (as has been shown in this
> discussion) with a sane VM subsystem like Linux's. I'd like to point out
> that clone() wasn't designed for vfork(), but it _was_ designed to be
> usable for different types of applications, and vfork() is a perfectly
> good use of it.
>
> As such, I no longer think that vfork() is a bad idea. It's an idea that
> requires either a really stupid VM layer (ie the original UNIX VM), or a
> really clever one (the Linux VM), and it's just hard to do with anything
> in between (ie "normal" UNIX).
>
> > I am now of the opinion that we should do nothing. vfork() application code
> > that is misbehaving needs to be fixed. Linux should not follow HP-UX and
> > Solaris direction by tolerating bad vfork() programming practices. Its not
> > a righteous thing to do.
>
> No. vfork() is a _major_ performance issue, and is worth supporting for
> that reason, especially as it requires about 15 lines of code to do so.
>
> The fact that it is hard to do if you're stupid about it is secondary.
>
> Linus

Wow (says me as I pick myself up off of the floor).

I suppose that a performance enhancement that also transforms an abomination
into a feature makes sense... not to mention that it will feel great to
see the other UNIXes scramble to do the same.

Thanks for the feedback Linus. Rock On.

Regards,
Reed H. Petty
rhp@draper.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.413 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site