git: kernel - Improve tsleep/wakeup queue collisions

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Sep 28 17:39:55 PDT 2017


commit 8acf06173d5e8936de7978fe9d1df471b196bf1f
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Sep 28 17:34:47 2017 -0700

    kernel - Improve tsleep/wakeup queue collisions
    
    * Expand the per-cpu array of TAILQs into an array of structures for
      tsleep/wakeup operation.
    
      The new structure stores up to four idents using a 4-way set-associative
      algorithm (-1 in ident0 handles overflows), allowing the originating cpu
      for a wakeup() to implement a second-level filter after the global array's
      cpumask.
    
    * This filter prevents nearly all possible spurious IPIs that used to occur
      due to ident hash collisions, even when the hash table size is forced to
      be relatively small.  The code isn't the best in the world, but the IPIs
      it saves probably blow away the added overhead.
    
    Testing-by: sephe, dillon

Summary of changes:
 sys/kern/kern_synch.c | 98 ++++++++++++++++++++++++++++++++++++++++++++-------
 sys/sys/globaldata.h  |  2 +-
 sys/sys/vmmeter.h     |  2 +-
 3 files changed, 88 insertions(+), 14 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8acf06173d5e8936de7978fe9d1df471b196bf1f


-- 
DragonFly BSD source repository



More information about the Commits mailing list