diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2021-11-08 18:35:34 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-11-09 10:02:52 -0800 |
commit | 741ddd4519c4d21eb7313e89a2c4ccc44a3dd6b9 (patch) | |
tree | 12c90b49d2ef7b66f1f14b94af4668dacce79ebc | |
parent | 6f1d34bd491c1bd0ac23100347e81080a2ec209d (diff) |
kcov: allocate per-CPU memory on the relevant node
During boot kcov allocates per-CPU memory which is used later if remote/
softirq processing is enabled.
Allocate the per-CPU memory on the CPU local node to avoid cross node
memory access.
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Acked-by: Dmitry Vyukov <[email protected]>
Acked-by: Marco Elver <[email protected]>
Tested-by: Marco Elver <[email protected]>
Reviewed-by: Andrey Konovalov <[email protected]>
Cc: Clark Williams <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | kernel/kcov.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kcov.c b/kernel/kcov.c index 80bfe71bbe13..4f910231d99a 100644 --- a/kernel/kcov.c +++ b/kernel/kcov.c @@ -1034,8 +1034,8 @@ static int __init kcov_init(void) int cpu; for_each_possible_cpu(cpu) { - void *area = vmalloc(CONFIG_KCOV_IRQ_AREA_SIZE * - sizeof(unsigned long)); + void *area = vmalloc_node(CONFIG_KCOV_IRQ_AREA_SIZE * + sizeof(unsigned long), cpu_to_node(cpu)); if (!area) return -ENOMEM; per_cpu_ptr(&kcov_percpu_data, cpu)->irq_area = area; |