From: Waiman Long <longman@redhat.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Waiman Long <longman@redhat.com>
Subject: [PATCH 2/2] mm/kmemleak: Disable KASAN instrumentation in kmemleak
Date: Thu, 7 Mar 2024 14:05:48 -0500 [thread overview]
Message-ID: <20240307190548.963626-3-longman@redhat.com> (raw)
In-Reply-To: <20240307190548.963626-1-longman@redhat.com>
Kmemleak ia a memory leak checker. KASAN is also a memory checker but
it focuses more on finding out-of-bounds and use-after-free bugs. Since
kmemleak is inherently slow especially on systems with large number of
CPUs, adding KASAN instrumentation will make it slower even more. As
kmemleak is not for production use, the utility of enabling KASAN there
is questionable.
This patch disables KASAN instrumentation for configurations that
enable both of them to slightly reduce performance overhead.
Signed-off-by: Waiman Long <longman@redhat.com>
---
mm/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/Makefile b/mm/Makefile
index e4b5b75aaec9..fc0f9a63a61e 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -5,6 +5,7 @@
KASAN_SANITIZE_slab_common.o := n
KASAN_SANITIZE_slub.o := n
+KASAN_SANITIZE_kmemleak.o := n
KCSAN_SANITIZE_kmemleak.o := n
# These produce frequent data race reports: most of them are due to races on
--
2.39.3
next prev parent reply other threads:[~2024-03-07 19:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 19:05 [PATCH 0/2] mm/kmemleak: Minor cleanup & performance tuning Waiman Long
2024-03-07 19:05 ` [PATCH 1/2] mm/kmemleak: Compact kmemleak_object further Waiman Long
2024-03-26 17:33 ` Catalin Marinas
2024-03-07 19:05 ` Waiman Long [this message]
2024-03-26 17:34 ` [PATCH 2/2] mm/kmemleak: Disable KASAN instrumentation in kmemleak Catalin Marinas
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=20240307190548.963626-3-longman@redhat.com \
--to=longman@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox