arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
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...
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.
© 2016 - 2026 Red Hat, Inc.