mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err()
@ 2026-08-27  6:55 Sergey Senozhatsky
  2026-08-27  6:59 ` Sergey Senozhatsky
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2026-08-27  6:55 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, x86,
	linux-perf-users, linux-kernel, Sergey Senozhatsky

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err()
  2026-08-27  6:55 [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err() Sergey Senozhatsky
@ 2026-08-27  6:59 ` Sergey Senozhatsky
  2026-08-27 10:20   ` Sergey Senozhatsky
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Senozhatsky @ 2026-08-27  6:59 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, x86, linux-perf-users, linux-kernel

On (26/08/27 15:55), Sergey Senozhatsky wrote:
> 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__);

                           ^^^  compile-testing patches?  Haven't heard of that...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err()
  2026-08-27  6:59 ` Sergey Senozhatsky
@ 2026-08-27 10:20   ` Sergey Senozhatsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2026-08-27 10:20 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, x86, linux-perf-users, linux-kernel

On (26/08/27 15:59), Sergey Senozhatsky wrote:
> On (26/08/27 15:55), Sergey Senozhatsky wrote:
> > 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__);

I guess also can just remove it altogether.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-27 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27  6:55 [RFC PATCH] perf/x86/intel: downgrade alloc_bts_buffer() WARN() to pr_err() Sergey Senozhatsky
2026-08-27  6:59 ` Sergey Senozhatsky
2026-08-27 10:20   ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®