1. 17 Apr, 2021 2 commits
    • Srikar Dronamraju's avatar
      powerpc/smp: Reintroduce cpu_core_mask · c47f892d
      Srikar Dronamraju authored
      Daniel reported that with Commit 4ca234a9 ("powerpc/smp: Stop
      updating cpu_core_mask") QEMU was unable to set single NUMA node SMP
      topologies such as:
       -smp 8,maxcpus=8,cores=2,threads=2,sockets=2
       i.e he expected 2 sockets in one NUMA node.
      
      The above commit helped to reduce boot time on Large Systems for
      example 4096 vCPU single socket QEMU instance. PAPR is silent on
      having more than one socket within a NUMA node.
      
      cpu_core_mask and cpu_cpu_mask for any CPU would be same unless the
      number of sockets is different from the number of NUMA nodes.
      
      One option is to reintroduce cpu_core_mask but use a slightly
      different method to arrive at the cpu_core_mask. Previously each CPU's
      chip-id would be compared with all other CPU's chip-id to verify if
      both the CPUs were related at the chip level. Now if a CPU 'A' is
      found related / (unrelated) to another CPU 'B', all the thread
      siblings of 'A' and thread siblings of 'B' are automatically marked as
      related / (unrelated).
      
      Also if a platform doesn't support ibm,chip-id property, i.e its
      cpu_to_chip_id returns -1, cpu_core_map holds a copy of
      cpu_cpu_mask().
      
      Fixes: 4ca234a9 ("powerpc/smp: Stop updating cpu_core_mask")
      Reported-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Tested-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210415120934.232271-2-srikar@linux.vnet.ibm.com
      c47f892d
    • Cédric Le Goater's avatar
      powerpc/xive: Use the "ibm, chip-id" property only under PowerNV · e9e16917
      Cédric Le Goater authored
      The 'chip_id' field of the XIVE CPU structure is used to choose a
      target for a source located on the same chip. For that, the XIVE
      driver queries the chip identifier from the "ibm,chip-id" property
      and compares it to a 'src_chip' field identifying the chip of a
      source. This information is only available on the PowerNV platform,
      'src_chip' being assigned to XIVE_INVALID_CHIP_ID under pSeries.
      
      The "ibm,chip-id" property is also not available on all platforms. It
      was first introduced on PowerNV and later, under QEMU for pSeries/KVM.
      However, the property is not part of PAPR and does not exist under
      pSeries/PowerVM.
      
      Assign 'chip_id' to XIVE_INVALID_CHIP_ID by default and let the
      PowerNV platform override the value with the "ibm,chip-id" property.
      Signed-off-by: default avatarCédric Le Goater <clg@kaod.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20210413130352.1183267-1-clg@kaod.org
      e9e16917
  2. 16 Apr, 2021 4 commits
  3. 14 Apr, 2021 34 commits