From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
x86@kernel.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err()
Date: Thu, 27 Aug 2026 15:55:10 +0900 [thread overview]
Message-ID: <20260827065529.3835720-1-senozhatsky@chromium.org> (raw)
We see alloc_bts_buffer() allocation failures under memory pressure,
while those allocation failures are non-fatal the WARN_ONCE() triggers
our fleet monitoring. Given that alloc_bts_buffer() can be called from
various paths (e.g. syscall() or kvm_emulate_wrmsr()) and fail multiple
times, there seem to be little value in that one single backtrace (for
first allocation failure only).
Downgrade WARN_ONCE() to pr_err_once().
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
arch/x86/events/intel/ds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index 8940f0292229..29c24b2925a7 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -918,7 +918,7 @@ static int alloc_bts_buffer(int cpu)
buffer = dsalloc_pages(BTS_BUFFER_SIZE, GFP_KERNEL | __GFP_NOWARN, cpu);
if (unlikely(!buffer)) {
- WARN_ONCE(1, "%s: BTS buffer allocation failure\n", __func__);
+ pr_err_once(1, "%s: BTS buffer allocation failure\n", __func__);
return -ENOMEM;
}
hwev->ds_bts_vaddr = buffer;
--
2.55.0.897.gb25b4bd76c-goog
next reply other threads:[~2026-08-27 6:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 6:55 Sergey Senozhatsky [this message]
2026-08-27 6:59 ` [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err() Sergey Senozhatsky
2026-08-27 10:20 ` Sergey Senozhatsky
2026-08-27 7:02 ` sashiko-bot
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=20260827065529.3835720-1-senozhatsky@chromium.org \
--to=senozhatsky@chromium.org \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.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