690fbe4295
A new function called spapr_numa_define_associativity_domains() is created to calculate the associativity domains and change the associativity arrays considering user input. This is how the associativity domain between two NUMA nodes A and B is calculated: - get the distance D between them - get the correspondent NUMA level 'n_level' for D. This is done via a helper called spapr_numa_get_numa_level() - all associativity arrays were initialized with their own numa_ids, and we're calculating the distance in node_id ascending order, starting from node id 0 (the first node retrieved by numa_state). This will have a cascade effect in the algorithm because the associativity domains that node 0 defines will be carried over to other nodes, and node 1 associativities will be carried over after taking node 0 associativities into account, and so on. This happens because we'll assign assoc_src as the associativity domain of dst as well, for all NUMA levels beyond and including n_level. The PPC kernel expects the associativity domains of the first node (node id 0) to be always 0 [1], and this algorithm will grant that by default. Ultimately, all of this results in a best effort approximation for the actual NUMA distances the user input in the command line. Given the nature of how PAPR itself interprets NUMA distances versus the expectations risen by how ACPI SLIT works, there might be better algorithms but, in the end, it'll also result in another way to approximate what the user really wanted. To keep this commit message no longer than it already is, the next patch will update the existing documentation in ppc-spapr-numa.rst with more in depth details and design considerations/drawbacks. [1] https://lore.kernel.org/linuxppc-dev/5e8fbea3-8faf-0951-172a-b41a2138fbcf@gmail.com/ Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20201007172849.302240-5-danielhb413@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> |
||
---|---|---|
.. | ||
e500-ccsr.h | ||
e500.c | ||
e500.h | ||
e500plat.c | ||
fdt.c | ||
fw_cfg.c | ||
Kconfig | ||
mac_newworld.c | ||
mac_oldworld.c | ||
mac.h | ||
meson.build | ||
mpc8544_guts.c | ||
mpc8544ds.c | ||
pnv_bmc.c | ||
pnv_core.c | ||
pnv_homer.c | ||
pnv_lpc.c | ||
pnv_occ.c | ||
pnv_pnor.c | ||
pnv_psi.c | ||
pnv_xscom.c | ||
pnv.c | ||
ppc4xx_devs.c | ||
ppc4xx_pci.c | ||
ppc405_boards.c | ||
ppc405_uc.c | ||
ppc405.h | ||
ppc440_bamboo.c | ||
ppc440_pcix.c | ||
ppc440_uc.c | ||
ppc440.h | ||
ppc_booke.c | ||
ppc.c | ||
ppce500_spin.c | ||
prep_systemio.c | ||
prep.c | ||
rs6000_mc.c | ||
sam460ex.c | ||
spapr_caps.c | ||
spapr_cpu_core.c | ||
spapr_drc.c | ||
spapr_events.c | ||
spapr_hcall.c | ||
spapr_iommu.c | ||
spapr_irq.c | ||
spapr_numa.c | ||
spapr_nvdimm.c | ||
spapr_ovec.c | ||
spapr_pci_nvlink2.c | ||
spapr_pci_vfio.c | ||
spapr_pci.c | ||
spapr_rng.c | ||
spapr_rtas_ddw.c | ||
spapr_rtas.c | ||
spapr_rtc.c | ||
spapr_tpm_proxy.c | ||
spapr_vio.c | ||
spapr.c | ||
trace-events | ||
trace.h | ||
virtex_ml507.c |