svn commit: r287153 - head/sys/dev/filemon
Bryan Drewery
bdrewery at FreeBSD.org
Wed Aug 26 03:37:19 UTC 2015
Author: bdrewery
Date: Wed Aug 26 03:37:18 2015
New Revision: 287153
URL: https://svnweb.freebsd.org/changeset/base/287153
Log:
Avoid taking proctree_lock and searching parents in wrappers if not needed.
This should help the case where filemon is loaded but not in use.
Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks
Modified:
head/sys/dev/filemon/filemon_wrapper.c
Modified: head/sys/dev/filemon/filemon_wrapper.c
==============================================================================
--- head/sys/dev/filemon/filemon_wrapper.c Wed Aug 26 03:33:34 2015 (r287152)
+++ head/sys/dev/filemon/filemon_wrapper.c Wed Aug 26 03:37:18 2015 (r287153)
@@ -88,6 +88,10 @@ filemon_pid_check(struct proc *p)
struct filemon *filemon;
filemon_lock_read();
+ if (TAILQ_EMPTY(&filemons_inuse)) {
+ filemon_unlock_read();
+ return (NULL);
+ }
sx_slock(&proctree_lock);
while (p != initproc) {
TAILQ_FOREACH(filemon, &filemons_inuse, link) {
More information about the svn-src-all
mailing list