• Gautham R Shenoy's avatar
    sched: Refactor the power savings balance code · c071df18
    Gautham R Shenoy authored
    Impact: cleanup
    
    Create seperate helper functions to initialize the
    power-savings-balance related variables, to update them and
    to check if we have a scope for performing power-savings balance.
    
    Add no-op inline functions for the !(CONFIG_SCHED_MC || CONFIG_SCHED_SMT)
    case.
    
    This will eliminate all the #ifdef jungle in find_busiest_group() and the
    other helper functions.
    Signed-off-by: default avatarGautham R Shenoy <ego@in.ibm.com>
    Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Suresh Siddha <suresh.b.siddha@intel.com>
    Cc: "Balbir Singh" <balbir@in.ibm.com>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Cc: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
    Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
    Cc: "Vaidyanathan Srinivasan" <svaidy@linux.vnet.ibm.com>
    LKML-Reference: <20090325091422.13992.73616.stgit@sofia.in.ibm.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    c071df18
sched.c 243 KB