From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> To: kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org Cc: Dmitry Vyukov <dvyukov@google.com>, Andrey Konovalov <andreyknvl@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, Steven Rostedt <rostedt@goodmis.org>, Marco Elver <elver@google.com>, Clark Williams <williams@redhat.com>, Sebastian Andrzej Siewior <bigeasy@linutronix.de> Subject: [PATCH 3/5] kcov: Allocate per-CPU memory on the relevant node. Date: Mon, 30 Aug 2021 19:26:25 +0200 [thread overview] Message-ID: <20210830172627.267989-4-bigeasy@linutronix.de> (raw) In-Reply-To: <20210830172627.267989-1-bigeasy@linutronix.de> 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. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- kernel/kcov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/kcov.c b/kernel/kcov.c index 80bfe71bbe13e..4f910231d99a2 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; -- 2.33.0
next prev parent reply other threads:[~2021-08-30 17:26 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-30 17:26 [PATCH 0/5] kcov: PREEMPT_RT fixup + misc Sebastian Andrzej Siewior 2021-08-30 17:26 ` [PATCH 1/5] Documentation/kcov: Include types.h in the example Sebastian Andrzej Siewior 2021-09-17 14:34 ` Dmitry Vyukov 2021-08-30 17:26 ` [PATCH 2/5] Documentation/kcov: Define `ip' " Sebastian Andrzej Siewior 2021-09-17 14:37 ` Dmitry Vyukov 2021-08-30 17:26 ` Sebastian Andrzej Siewior [this message] 2021-09-17 14:38 ` [PATCH 3/5] kcov: Allocate per-CPU memory on the relevant node Dmitry Vyukov 2021-08-30 17:26 ` [PATCH 4/5] kcov: Avoid enable+disable interrupts if !in_task() Sebastian Andrzej Siewior 2021-09-17 14:50 ` Dmitry Vyukov 2021-08-30 17:26 ` [PATCH 5/5] kcov: Replace local_irq_save() with a local_lock_t Sebastian Andrzej Siewior 2021-09-17 14:58 ` Dmitry Vyukov 2021-09-06 16:13 ` [PATCH 0/5] kcov: PREEMPT_RT fixup + misc Marco Elver 2021-09-06 16:28 ` Sebastian Andrzej Siewior 2021-09-20 9:26 ` Marco Elver 2021-09-20 9:50 ` Sebastian Andrzej Siewior
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210830172627.267989-4-bigeasy@linutronix.de \ --to=bigeasy@linutronix.de \ --cc=andreyknvl@gmail.com \ --cc=dvyukov@google.com \ --cc=elver@google.com \ --cc=kasan-dev@googlegroups.com \ --cc=linux-kernel@vger.kernel.org \ --cc=rostedt@goodmis.org \ --cc=tglx@linutronix.de \ --cc=williams@redhat.com \ --subject='Re: [PATCH 3/5] kcov: Allocate per-CPU memory on the relevant node.' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.