diff options
author | phk <phk@FreeBSD.org> | 1999-11-16 20:31:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-11-16 20:31:58 +0000 |
commit | cc6b664e2eb821b39837e7bb980e5ee87e201491 (patch) | |
tree | 65eeb4add32e588f36f28e2a0bb819c17a67ff70 /sys/kern/kern_fork.c | |
parent | 47e5f46c7642e6d8e2ed20c8afca59596d3c2dc1 (diff) | |
download | FreeBSD-src-cc6b664e2eb821b39837e7bb980e5ee87e201491.zip FreeBSD-src-cc6b664e2eb821b39837e7bb980e5ee87e201491.tar.gz |
Introduce commandline caching in the kernel.
This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.
To disable this facility and revert to previous behaviour:
sysctl -w kern.ps_arg_cache_limit=0
For full details see the current@FreeBSD.org mail-archives.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 0fbe915..9268592 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -337,6 +337,9 @@ again: p2->p_flag |= P_JAILED; } + if (p2->p_args) + p2->p_args->ar_ref++; + if (flags & RFSIGSHARE) { p2->p_procsig = p1->p_procsig; p2->p_procsig->ps_refcnt++; |