Bug 26638

Summary: kern.fast_vfork sysctl doesn't do anything & maybe should?
Product: Base System Reporter: matt <matt>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description matt 2001-04-17 09:40:00 UTC
This sysctl used to control whether vfork(2) passes the RFMEM flag to fork1 (see sys/kern/kern_fork.c:vfork).  This behavior was removed in kern_fork.c:1.62, but the sysctl remains, and nothing uses the fast_vfork variable any more.

I do not understand the commit message for 1.62, not being a kernel hacker, but it does not obviously say to me that this was a deliberate change.  

I'll expose my ignorance further by guessing that what `fast_vfork' means is `don't implement copy-on-write behavior for the process's memory during a vfork, so that the child is able to modify the memory that the parent will see when it's reawakened.'  I am supported in this guess by the fact that restoring the old behavior, and turning fast_vfork off, fixes some problems I was having using vfork (directly, via syscall()) in Perl.

So, my ignorant opinion is that the old behavior, removed in 1.62, should be restored, since this sysctl is handy.  If it can't be restored, then it seems to me that it should be removed, or at least made readonly, to correspond with reality.
Comment 1 silby freebsd_committer freebsd_triage 2002-02-04 03:31:12 UTC
State Changed
From-To: open->closed

fast_vfork + the sysctl have been removed.