git: DragonFly_RELEASE_4_6 kernel - Refactor cpu localization for VM page allocations (3)

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jul 31 00:03:47 PDT 2016


commit 4161f66d193c22aaa9e8714572d118897ec4062c
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Jul 30 20:40:06 2016 -0700

    kernel - Refactor cpu localization for VM page allocations (3)
    
    * Instead of iterating the cpus in the mask starting at cpu #0, iterate
      starting at mycpu to the end, then from 0 to mycpu - 1.
    
      This fixes random masked wakeups from favoring lower-numbered cpus.
    
    * The user process scheduler (usched_dfly) was favoring lower-numbered
      cpus due to a bug in the simple selection algorithm, causing forked
      processes to initially weight improperly.  A high fork or fork/exec
      rate skewed the way the cpus were loaded.
    
      Fix this by correctly scanning cpus from the (scancpu) rover.
    
    * For now, use a random 'previous' affinity for initially scheduling a
      fork.

Summary of changes:
 sys/cpu/x86_64/include/cpumask.h |  7 +++
 sys/kern/lwkt_ipiq.c             | 31 +++++++++++--
 sys/kern/usched_dfly.c           | 99 +++++++++++++++++++++++++++-------------
 sys/vm/vm_zeroidle.c             | 10 +---
 4 files changed, 105 insertions(+), 42 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4161f66d193c22aaa9e8714572d118897ec4062c


-- 
DragonFly BSD source repository



More information about the Commits mailing list