• Gautham R Shenoy's avatar
    sched: Simple helper functions for find_busiest_group() · 67bb6c03
    Gautham R Shenoy authored
    Impact: cleanup
    
    Currently the load idx calculation code is in find_busiest_group().
    Move that to a static inline helper function.
    
    Similary, to find the first cpu of a sched_group we use
    cpumask_first(sched_group_cpus(group))
    
    Use a helper to that. It improves readability in some cases.
    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: <20090325091335.13992.55424.stgit@sofia.in.ibm.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    67bb6c03
sched.c 236 KB