git: kernel - Implement td_limit reflection of p_limit
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Apr 19 19:41:07 PDT 2018
commit 384ee8f01ebd5f89d81412517d1f5aca8bcdaba8
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Apr 19 17:52:53 2018 -0700
kernel - Implement td_limit reflection of p_limit
* Reflect proc->p_limit onto thread->td_limit to allow lockless
rlimits testing.
* Significantly improves performance for rlimits-testing-centric
operations such as for dup() and dup2().
* Also fixes performance issues across processes when the plimit
structure is shared across many processes. In this situation,
unnecessary locking conflicts developed due to the high level
of sharing across what would normally be considered distinct
processes.
Suggested-by: mjg
Summary of changes:
sys/kern/kern_descrip.c | 47 ++++++++++++++++++++++++++++++++---------------
sys/kern/kern_exit.c | 9 ++++++++-
sys/kern/kern_plimit.c | 31 +++++++++++++++++++++++++++----
sys/kern/kern_synch.c | 2 +-
sys/sys/resourcevar.h | 9 +++++----
sys/sys/thread.h | 4 ++--
6 files changed, 75 insertions(+), 27 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/384ee8f01ebd5f89d81412517d1f5aca8bcdaba8
--
DragonFly BSD source repository
More information about the Commits
mailing list