git: kernel - Performance optimization pass
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Oct 11 10:53:14 PDT 2013
commit b7ebebd18bb9366e6938415e2030c9ee7fdff081
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Oct 11 10:48:43 2013 -0700
kernel - Performance optimization pass
* Numerous pid and priority related syscalls, such as getpid(), were
improperly acquiring proc_token to protect fields that are now protected
with per-process or per-pgrp tokens.
Do a pass on kern_prot.c and kern_resource.c fixing these issues. This
removes the use of proc_token from several common system call paths but
it should be noted that none of these system calls are in critical paths.
The benefit is probably minor but will improve performance in the face
of allproc-scanning operations (such as when you do a 'ps' or 'top').
* vmntvnodescan() is not in the critical path except for vflush()'s which
occur on umount. vflush()'s pass a NULL fast function. The
vmntvnodescan() only needs to hold the vmobj_token when the fastfunc is
non-NULL. Do not hold the vmobj_token when fastfunc is NULL.
This primarily improves performance when tmpfs's are being mounted and
unmounted at a high rate (poudriere bulk builds).
Summary of changes:
sys/kern/kern_prot.c | 35 +++++---
sys/kern/kern_resource.c | 224 ++++++++++++++++++++++++++---------------------
sys/kern/kern_sig.c | 2 +-
sys/kern/vfs_mount.c | 9 +-
4 files changed, 156 insertions(+), 114 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b7ebebd18bb9366e6938415e2030c9ee7fdff081
--
DragonFly BSD source repository
More information about the Commits
mailing list