git: kernel - proc_token performance cleanups

Matthew Dillon dillon at
Wed Oct 23 09:31:36 PDT 2013

commit fa3d6eac330eb8aa1cec60e11f572cc97c5c1620
Author: Matthew Dillon <dillon at>
Date:   Wed Oct 23 09:27:41 2013 -0700

    kernel - proc_token performance cleanups
    * pfind()/pfindn()/zpfind() now acquire proc_token shared.
    * Fix a bug in alllwp_scan().  Must hold p->p_token while scanning
      its lwp's.
    * Process list scan can use a shared token, use pfind() instead of
      pfindn() and remove proc_token for individual pid lookups.
    * cwd can use a shared p->p_token.
    * getgroups(), seteuid(), and numerous other uid/gid access and setting
      functions need to use p->p_token, not proc_token (Repored by enjolras).

Summary of changes:
 sys/kern/kern_proc.c     |  39 +++++++++--------
 sys/kern/kern_prot.c     | 111 +++++++++--------------------------------------
 sys/kern/kern_resource.c |   1 -
 3 files changed, 43 insertions(+), 108 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list