• X
    sched/cputime: account irq cputime for accurately · ad6a0d7a
    Xie XiuQi 提交于
    hulk inclusion
    category: bugfix
    bugzilla: 13257
    CVE: NA
    
    If there are a lot of interruptions, the CPU usage fluctuation
    will be more serious. Because CONFIG_IRQ_TIME_ACCOUNTING is not
    enabled, the interrupt time is not counted separately. If the
    interrupt occurs during the idle period, the idle runtime including
    irq time. When irq occurs during other task, the runtime of the
    task include irq time also.
    
    Therefore, when the irq is irregular, the occupancy statistics
    of the CPU may fluctuate greatly.
    
    In this patch, use CONFIG_IRQ_TIME_ACCOUNTING to count the
    irq time, the irq time is subtracted from the idle time, and
    the CPU usage can be relatively accurately counted.
    Signed-off-by: NXie XiuQi <xiexiuqi@huawei.com>
    Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    ad6a0d7a
kernel_stat.h 2.5 KB