git: statclock: Fix intr% counting on heavily interrupted systems

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Thu Aug 2 02:32:31 PDT 2012


commit 6026c54d859820652639d22385e89f06d26a3437
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Thu Aug 2 17:26:30 2012 +0800

    statclock: Fix intr% counting on heavily interrupted systems
    
    statclock() has high probability to run from crit_exit() on heavily
    interrupted systems and 'frame' is NULL in this case, so intr% is
    mis-counted as sys%.
    
    To fix this, TDF_INTTHREAD is used to determine whether intr% should
    be counted or not, in addition to testing gd_intr_nest_level and
    'frame'

Summary of changes:
 sys/cpu/i386/include/cpu.h   |    3 ++-
 sys/cpu/x86_64/include/cpu.h |    3 ++-
 sys/kern/kern_clock.c        |   12 +++++++++---
 3 files changed, 13 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6026c54d859820652639d22385e89f06d26a3437


-- 
DragonFly BSD source repository





More information about the Commits mailing list