Skip to content

Commit 8f10046

Browse files
AlisonSchofieldhansendc
authored andcommitted
ACPI/NUMA: Apply SRAT proximity domain to entire CFMWS window
Commit fd49f99 ("ACPI: NUMA: Add a node and memblk for each CFMWS not in SRAT") did not account for the case where the BIOS only partially describes a CFMWS Window in the SRAT. That means the omitted address ranges, of a partially described CFMWS Window, do not get assigned to a NUMA node. Replace the call to phys_to_target_node() with numa_add_memblks(). Numa_add_memblks() searches an HPA range for existing memblk(s) and extends those memblk(s) to fill the entire CFMWS Window. Extending the existing memblks is a simple strategy that reuses SRAT defined proximity domains from part of a window to fill out the entire window, based on the knowledge* that all of a CFMWS window is of a similar performance class. *Note that this heuristic will evolve when CFMWS Windows present a wider range of characteristics. The extension of the proximity domain, implemented here, is likely a step in developing a more sophisticated performance profile in the future. There is no change in behavior when the SRAT does not describe the CFMWS Window at all. In that case, a new NUMA node with a single memblk covering the entire CFMWS Window is created. Fixes: fd49f99 ("ACPI: NUMA: Add a node and memblk for each CFMWS not in SRAT") Reported-by: Derick Marks <[email protected]> Suggested-by: Dan Williams <[email protected]> Signed-off-by: Alison Schofield <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Dan Williams <[email protected]> Tested-by: Derick Marks <[email protected]> Link: https://lore.kernel.org/all/eaa0b7cffb0951a126223eef3cbe7b55b8300ad9.1689018477.git.alison.schofield%40intel.com
1 parent 8f012db commit 8f10046

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/acpi/numa/srat.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,16 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
310310
start = cfmws->base_hpa;
311311
end = cfmws->base_hpa + cfmws->window_size;
312312

313-
/* Skip if the SRAT already described the NUMA details for this HPA */
314-
node = phys_to_target_node(start);
315-
if (node != NUMA_NO_NODE)
313+
/*
314+
* The SRAT may have already described NUMA details for all,
315+
* or a portion of, this CFMWS HPA range. Extend the memblks
316+
* found for any portion of the window to cover the entire
317+
* window.
318+
*/
319+
if (!numa_fill_memblks(start, end))
316320
return 0;
317321

322+
/* No SRAT description. Create a new node. */
318323
node = acpi_map_pxm_to_node(*fake_pxm);
319324

320325
if (node == NUMA_NO_NODE) {

0 commit comments

Comments
 (0)