kernel - proc_token performance cleanups
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 23 Oct 2013 16:27:41 +0000 (09:27 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 23 Oct 2013 16:27:41 +0000 (09:27 -0700)
commitfa3d6eac330eb8aa1cec60e11f572cc97c5c1620
treeeaf0a9a3475f62b4fc8b2ba5df3e71d468c4f0df
parent26e3ecb389c3c4660941d8a4cab9b932241c7c78
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).
sys/kern/kern_proc.c
sys/kern/kern_prot.c
sys/kern/kern_resource.c