• Vincent Guittot's avatar
    sched: Rework sched_domain topology definition · 143e1e28
    Vincent Guittot authored
    We replace the old way to configure the scheduler topology with a new method
    which enables a platform to declare additionnal level (if needed).
    
    We still have a default topology table definition that can be used by platform
    that don't want more level than the SMT, MC, CPU and NUMA ones. This table can
    be overwritten by an arch which either wants to add new level where a load
    balance make sense like BOOK or powergating level or wants to change the flags
    configuration of some levels.
    
    For each level, we need a function pointer that returns cpumask for each cpu,
    a function pointer that returns the flags for the level and a name. Only flags
    that describe topology, can be set by an architecture. The current topology
    flags are:
    
     SD_SHARE_CPUPOWER
     SD_SHARE_PKG_RESOURCES
     SD_NUMA
     SD_ASYM_PACKING
    
    Then, each level must be a subset on the next one. The build sequence of the
    sched_domain will take care of removing useless levels like those with 1 CPU
    and those with the same CPU span and no more relevant information for
    load balancing than its children.
    Signed-off-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
    Tested-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
    Reviewed-by: default avatarPreeti U Murthy <preeti@linux.vnet.ibm.com>
    Reviewed-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
    Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Bjorn Helgaas <bhelgaas@google.com>
    Cc: Chris Metcalf <cmetcalf@tilera.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Hanjun Guo <hanjun.guo@linaro.org>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Jason Low <jason.low2@hp.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: linux390@de.ibm.com
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Link: http://lkml.kernel.org/r/1397209481-28542-2-git-send-email-vincent.guittot@linaro.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    143e1e28
topology.h 1.71 KB