linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"Robin H. Johnson" <robbat2@gentoo.org>,
	linux-kernel@vger.kernel.org, mingo@redhat.com,
	rjohnson@digitalocean.com,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH 1/2] tracing: show size of requested buffer
Date: Thu, 7 Oct 2021 17:26:04 +0000	[thread overview]
Message-ID: <robbat2-20211007T172058-955036195Z@orbis-terrarum.net> (raw)
In-Reply-To: <20211007092358.65152792@gandalf.local.home>

[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]

On Thu, Oct 07, 2021 at 09:23:58AM -0400, Steven Rostedt wrote:
> On Thu, 7 Oct 2021 09:11:51 +0200
> Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > > > +++ b/kernel/trace/trace_event_perf.c
> > > > @@ -400,7 +400,8 @@ void *perf_trace_buf_alloc(int size, struct pt_regs **regs, int *rctxp)
> > > >  	BUILD_BUG_ON(PERF_MAX_TRACE_SIZE % sizeof(unsigned long));
> > > >  
> > > >  	if (WARN_ONCE(size > PERF_MAX_TRACE_SIZE,
> > > > -		      "perf buffer not large enough"))
> > > > +		      "perf buffer not large enough, wanted %d, have %d",
> > > > +		      size, PERF_MAX_TRACE_SIZE))  
> > 
> > Priting a constant seems daft.. why is any of this important in any way?
> 
> I see your point, but it can be useful if you changed it, and want to know
> if you are running the kernel with the change or not.
> 
> I've done daft things were I changed a const and was running a kernel
> without the change and couldn't understand why it wasn't working ;-)
Yes, my initial internal versions of this series only bumped the
constant, and then I was running a few different kernels, and being able
to compare which value was in use became a problem.

I was trying to think further what would make sense for the constant.
- What are the negative impacts of a too-large value?
- Is there demand for more reconfigurability? 
- Should PERF_MAX_TRACE_SIZE be a knob in Kconfig?

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1113 bytes --]

  reply	other threads:[~2021-10-07 17:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  4:37 [PATCH 1/2] tracing: show size of requested buffer Robin H. Johnson
2021-08-31  4:37 ` [PATCH 2/2] tracing: increase PERF_MAX_TRACE_SIZE to handle Sentinel1 and docker together Robin H. Johnson
2021-09-08  1:24 ` [PATCH 1/2] tracing: show size of requested buffer Steven Rostedt
2021-10-07  7:11   ` Peter Zijlstra
2021-10-07 13:23     ` Steven Rostedt
2021-10-07 17:26       ` Robin H. Johnson [this message]
2021-10-08 22:13         ` Steven Rostedt
2021-10-09  0:21           ` Robin H. Johnson
2021-10-26 20:43       ` Steven Rostedt
2021-10-26 21:23         ` Peter Zijlstra
2021-10-26 21:26           ` Steven Rostedt
2021-10-06 22:26 ` Steven Rostedt
2021-10-06 22:48   ` Robin H. Johnson
2021-10-07  0:55     ` Steven Rostedt

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=robbat2-20211007T172058-955036195Z@orbis-terrarum.net \
    --to=robbat2@gentoo.org \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjohnson@digitalocean.com \
    --cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).