• Srikar Dronamraju's avatar
    sched/topology: Set correct NUMA topology type · e5e96faf
    Srikar Dronamraju authored
    With the following commit:
    
      051f3ca0 ("sched/topology: Introduce NUMA identity node sched domain")
    
    the scheduler introduced a new NUMA level. However this leads to the NUMA topology
    on 2 node systems to not be marked as NUMA_DIRECT anymore.
    
    After this commit, it gets reported as NUMA_BACKPLANE, because
    sched_domains_numa_level is now 2 on 2 node systems.
    
    Fix this by allowing setting systems that have up to 2 NUMA levels as
    NUMA_DIRECT.
    
    While here remove code that assumes that level can be 0.
    Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Andre Wild <wild@linux.vnet.ibm.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@surriel.com>
    Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
    Fixes: 051f3ca0 "Introduce NUMA identity node sched domain"
    Link: http://lkml.kernel.org/r/1533920419-17410-1-git-send-email-srikar@linux.vnet.ibm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    e5e96faf
topology.c 47.5 KB