git: kernel - Simple code path optimizations

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Feb 25 22:18:15 PST 2020


commit 2ff21866646c375554d68d9786f54f5ae72f6aeb
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Feb 25 22:05:43 2020 -0800

    kernel - Simple code path optimizations
    
    * Add __read_mostly and __read_frequently to numerous variables as
      appropriate to reduce unnecessary cache line ping-ponging.
    
    * Adjust conditionals in the syscall code with __predict_true/false
      to clean up the execution path.

Summary of changes:
 sys/kern/kern_clock.c                | 16 +++++----
 sys/kern/kern_exec.c                 | 19 ++++++-----
 sys/kern/kern_shutdown.c             |  6 ++--
 sys/kern/vfs_cache.c                 | 12 ++++---
 sys/net/netisr.c                     |  4 +--
 sys/platform/pc64/x86_64/trap.c      | 66 +++++++++++++++++++++---------------
 sys/platform/vkernel64/x86_64/trap.c |  6 ----
 sys/sys/ktr.h                        | 19 +++++++----
 sys/sys/ktrace.h                     | 16 ++++++---
 sys/sys/proc.h                       | 10 +++---
 sys/vm/vm_map.c                      | 10 +++---
 11 files changed, 105 insertions(+), 79 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2ff21866646c375554d68d9786f54f5ae72f6aeb


-- 
DragonFly BSD source repository



More information about the Commits mailing list