git: kernel - Clean up ucred and plimit cache line locality

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Oct 16 11:30:38 PDT 2017


commit 327aab1f73ae821489680434e29dd7ef4c0607f3
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Oct 15 17:42:26 2017 -0700

    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.

Summary of changes:
 sys/kern/kern_exit.c   |   8 +-
 sys/kern/kern_plimit.c | 212 +++++++++++++++----------------------------------
 sys/kern/kern_prot.c   |   4 +-
 sys/sys/resourcevar.h  |  22 +++--
 sys/sys/ucred.h        |  13 ++-
 5 files changed, 99 insertions(+), 160 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/327aab1f73ae821489680434e29dd7ef4c0607f3


-- 
DragonFly BSD source repository



More information about the Commits mailing list