kernel - Clean up ucred and plimit cache line locality
commit327aab1f73ae821489680434e29dd7ef4c0607f3
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 16 Oct 2017 00:42:26 +0000 (15 17:42 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 16 Oct 2017 18:30:24 +0000 (16 11:30 -0700)
tree8785929eaf1525d8329f5101958539c21c5528c2
parent7832c77596c26db846c39167d8495a7a7ca3974a
kernel - Clean up ucred and plimit cache line locality

* Move struct plimit's p_spin and p_refcnt fields into their own
  cacheline.  This structure is massively shared and read often.
  Doing this avoids unnecessary cache line ping-pongs.

* Only use p_spin to modify a resource limit.  Do not use it to
  access the resource limit.

* Integrate plimit's exclusivity flag into p_refcnt.

* Move struct ucred's cr_ref into its own cacheline.  This structure
  is massively shared and read often.  Doing this avoids unnecessary
  cache line ping-pongs.
sys/kern/kern_exit.c
sys/kern/kern_plimit.c
sys/kern/kern_prot.c
sys/sys/resourcevar.h
sys/sys/ucred.h