• A
    ondemand: Solve a big performance issue by counting IOWAIT time as busy · 6b8fcd90
    Arjan van de Ven 提交于
    The ondemand cpufreq governor uses CPU busy time (e.g. not-idle
    time) as a measure for scaling the CPU frequency up or down.
    If the CPU is busy, the CPU frequency scales up, if it's idle,
    the CPU frequency scales down. Effectively, it uses the CPU busy
    time as proxy variable for the more nebulous "how critical is
    performance right now" question.
    
    This algorithm falls flat on its face in the light of workloads
    where you're alternatingly disk and CPU bound, such as the ever
    popular "git grep", but also things like startup of programs and
    maildir using email clients... much to the chagarin of Andrew
    Morton.
    
    This patch changes the ondemand algorithm to count iowait time
    as busy, not idle, time. As shown in the breakdown cases above,
    iowait is performance critical often, and by counting iowait,
    the proxy variable becomes a more accurate representation of the
    "how critical is performance" question.
    
    The problem and fix are both verified with the "perf timechar"
    tool.
    Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NDave Jones <davej@redhat.com>
    Reviewed-by: NRik van Riel <riel@redhat.com>
    Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
    LKML-Reference: <20100509082606.3d9f00d0@infradead.org>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    6b8fcd90
cpufreq_ondemand.c 22.2 KB