Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp750257pxb; Thu, 23 Sep 2021 09:49:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3YmYmXKK7W4w0bfuczYFQSoUlXxA6b2iB+xA4QitzOq40VnqtcA5AuS5Vr4BOQ4tmZftA X-Received: by 2002:a92:c683:: with SMTP id o3mr4747692ilg.0.1632415772559; Thu, 23 Sep 2021 09:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632415772; cv=none; d=google.com; s=arc-20160816; b=e8xqrgGOAzzh0lvsPQ+ZOeFpsaal0HrfFxfNg2Jx65jNKGE3uDd5jplpTe5LqjptCh gxZvoHVsrbROaR3MhINV0e6T/D7m891cQ8pOUY08RhlzoTbOAb9hmiJB0qqasR2pINCV CQ4lz3a3nQ9ARLpqM72weqdKPvUG9Vh2y7ewZmZh4X4kzmoHlZ7LL4CyFqFf6/GeQ7HB C3cLoSTQ5OqnDRatIW3i4n8L0Bx8KDODJPmzDHW7TXTLr+8Dlk0tVmfTzuBAXU1Z9blN 6EaHEk33OlB/xeU63m0Bupb0mi7+FhosSRmSCM4tAsmPWdTh6erW2R6oPhwymlockmpN nrFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=2MhgQj1OhNDXz0bPvvBfoxg/NZ1WrouJm6NgCj0VKRs=; b=fFeuhzV/60Of6RUDbQswrPT9YjAdSkla+T1r1Rs0jziapancR/1RV3bSSyRHSQc/HP /vqa9QVppVzGVWOKXTircP6yJ71iG+ZPUwyZJN3hfNDKP/nGdu/4Yb5BtKpjKUbiny+X xfG+VRemwmHD7e64FqPWGnc+rZpJUrhUrvTsu3fJIN0y0j78B0j141ltz07k64n3eEBw LSkm1pFxyYrb5c/gohlMwI7i7T72YkX/u5i+vB2aQkTPjszKfUUwYj7AAa47qKmhP8aU nIYJfHD1wXVbMawQknZPPoTzIIS8h/S+ft5oHAJJpNnZdeJ6p9N8kErh7q7SGAkihDgT K83g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iBOYuNNy; dkim=neutral (no key) header.i=@linutronix.de header.b=lb5BHGJk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a13si6368318ilk.74.2021.09.23.09.49.20; Thu, 23 Sep 2021 09:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iBOYuNNy; dkim=neutral (no key) header.i=@linutronix.de header.b=lb5BHGJk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242133AbhIWQtg (ORCPT + 99 others); Thu, 23 Sep 2021 12:49:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235896AbhIWQtW (ORCPT ); Thu, 23 Sep 2021 12:49:22 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C977C061757 for ; Thu, 23 Sep 2021 09:47:51 -0700 (PDT) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632415669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2MhgQj1OhNDXz0bPvvBfoxg/NZ1WrouJm6NgCj0VKRs=; b=iBOYuNNyrlgroA3GzzQj6XShZfY4/p0zoJ0Bk47m/Or3UcnwSJslqN7NIySgj8LxqmHyHw mouk/wZPaAwlLbNvLyLlYMx9z8XJZkveBtXGw+8BNZLLv2jzAPSrAlWJRWd9lcsEiRnXmo BmnGoVGwo4uy0LZhgkfP0z5q/GILayfZaoxC0tZw7KXRsZqxNH7v4F/c/qt4Xk0SvAtDPW FsKz7+ph6lABBbJHI/LTJLrNhZsYYJAH8xtKdfUkN8211qbBUZ6rUTYjybdKXjv8X02xqf Hlaa9ZO6kSrmawiuc0K68zpY6eTrGtT4c4S7XKxniz0RILxItr/3uw74dIJy5w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632415669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2MhgQj1OhNDXz0bPvvBfoxg/NZ1WrouJm6NgCj0VKRs=; b=lb5BHGJkT2gvWf2pb7De5S9gaRoS2yxMnbXLmoI3FN9Cna1jcm1huWLnj6NXGiOV/okcrK XxziWmqtdZ3OAiBQ== To: kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org Cc: Dmitry Vyukov , Andrey Konovalov , Thomas Gleixner , Steven Rostedt , Marco Elver , Clark Williams , Andrew Morton , Sebastian Andrzej Siewior Subject: [PATCH v2 3/5] kcov: Allocate per-CPU memory on the relevant node. Date: Thu, 23 Sep 2021 18:47:39 +0200 Message-Id: <20210923164741.1859522-4-bigeasy@linutronix.de> In-Reply-To: <20210923164741.1859522-1-bigeasy@linutronix.de> References: <20210923164741.1859522-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Dmitry Vyukov Acked-by: Marco Elver Tested-by: Marco Elver Link: https://lore.kernel.org/r/20210830172627.267989-4-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; =20 for_each_possible_cpu(cpu) { - void *area =3D vmalloc(CONFIG_KCOV_IRQ_AREA_SIZE * - sizeof(unsigned long)); + void *area =3D 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 =3D area; --=20 2.33.0