summaryrefslogtreecommitdiffstats
path: root/sys/sys/param.h
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-03-21 20:29:27 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-03-21 20:29:27 +0000
commitc059a9d2492560cccd45429da2cc42f0126cd639 (patch)
treebb86d14cdd4fdc49cd8eb52bf1c29708818c4198 /sys/sys/param.h
parenta436b81da6994c6c7a189b8ceddce387b8896663 (diff)
downloadFreeBSD-src-c059a9d2492560cccd45429da2cc42f0126cd639.zip
FreeBSD-src-c059a9d2492560cccd45429da2cc42f0126cd639.tar.gz
Track filemon usage via a proc.p_filemon pointer rather than its own lists.
- proc.p_filemon is added which is protected by PROC_LOCK. This improves performance and avoids double-fork issues, taking allproc_lock while in syscalls, and walking the process tree in syscalls. A particular proc.p_filemon can only be changed to NULL or another filemon, or the filemon inherited, while the filemon->lock is held. - Filemon are reference counted. On the last reference the log will be closed. - When closing the devfs file handle, the filemon will be detached from all processes and inheritance prevented. - Disallow attaching to a process already being traced since filemon is typically intended to be used on children only. This is allowed for curproc as bmake relies on this behavior for rare cases when combining .MAKE with .META. - Detach any previously tracked process on ioctl(FILEMON_SET_PID). - Handle error from devfs_set_cdevpriv() in filemon_open(). - The global filemon lock and lists are removed. - A free list is no longer kept. Previously this list was forever-expanding and never garbage cleaned. - No longer loses track of double-forks. If the process holding the filemon handle closes it will close the log rather than wait on a daemonized process, but it will log all activity until it closes its handle. The filemon will be removed from the process and not inherited. - A separate process count is kept only as an optimization for forced detachment to avoid taking allproc_lock and walking the entire process tree. - struct filemon access is protected by sx(9) filemon->lock as it was before. - Add more comments and KASSERTS. MFC after: 2 weeks Reviewed by: kib, mjg, markj (all on previous versions) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5520
Diffstat (limited to 'sys/sys/param.h')
-rw-r--r--sys/sys/param.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h
index dc3b035..987453c 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -58,7 +58,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1100103 /* Master, propagated to newvers */
+#define __FreeBSD_version 1100104 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
OpenPOWER on IntegriCloud