From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Peter Zijlstra" <peterz@infradead.org>,
"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Andrii Nakryiko" <andrii.nakryiko@gmail.com>,
"Jiri Olsa" <jolsa@kernel.org>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Jesper Dangaard Brouer" <brouer@redhat.com>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Martin KaFai Lau" <kafai@fb.com>,
"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
"Andrii Nakryiko" <andriin@fb.com>,
"Quentin Monnet" <quentin.monnet@netronome.com>
Subject: Re: [RFC] btf: Some structs are doubled because of struct ring_buffer
Date: Fri, 13 Dec 2019 19:36:46 +0100 [thread overview]
Message-ID: <20191213183646.GB8994@krava> (raw)
In-Reply-To: <20191213132941.6fa2d1bd@gandalf.local.home>
On Fri, Dec 13, 2019 at 01:29:41PM -0500, Steven Rostedt wrote:
> On Fri, 13 Dec 2019 19:02:23 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:
>
> > On Fri, Dec 13, 2019 at 12:11:18PM -0500, Steven Rostedt wrote:
> > > On Fri, 13 Dec 2019 08:51:57 -0800
> > > Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> > >
> > > > It had two choices. Both valid. I don't know why gdb picked this one.
> > > > So yeah I think renaming 'ring_buffer' either in ftrace or in perf would be
> > > > good. I think renaming ftrace one would be better, since gdb picked perf one
> > > > for whatever reason.
> > >
> > > Because of the sort algorithm. But from a technical perspective, the
> > > ring buffer that ftrace uses is generic, where the perf ring buffer can
> > > only be used for perf. Call it "event_ring_buffer" or whatever, but
> > > it's not generic and should not have a generic name.
> >
> > Your ring buffer was so generic that I gave up trying to use it after
> > trying for days :-( (the fundamental problem was that it was impossible
> > to have a single cpu buffer; afaik that is still true today)
>
> Yeah, but that could have been fixed, and the only reason it's not
> today, is because it requires more overhead to do so.
>
> IIRC, the main reason that you didn't use it then, is because it wasn't
> fully lockless at the time (it is today), and you couldn't use it from
> NMI context.
>
> >
> > Nor is the perf buffer fundamentally specific to perf, but there not
> > being another user means there has been very little effort to remove
> > perf specific things from it.
>
> I took a look at doing so, and it was not a trivial task.
>
> >
> > There are major design differences between them, which is
> > unquestionably, but I don't think it is fair to say one is more or less
> > generic.
> >
> > How about we rename both? I'm a bit adverse to long names, so how about
> > we rename the perf one to perf_buffer and the trace one to trace_buffer?
>
> I'm fine with this idea! Now what do we call the ring buffer that
> tracing uses, as it is not specific for tracing, it was optimized for
> splicing. But sure, I can rename it to trace_buffer. I just finished
> renaming perf's...
>
> Thinking about this, perhaps we should remove the word "ring" from
> both. That is:
>
> perf_buffer and trace_buffer ?
sounds good to me.. and too good to be true ;-)
please let me know if I should send the perf change
thanks,
jirka
next prev parent reply other threads:[~2019-12-13 20:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 15:35 [RFC] btf: Some structs are doubled because of struct ring_buffer Jiri Olsa
2019-12-13 16:25 ` Steven Rostedt
2019-12-13 16:51 ` Alexei Starovoitov
2019-12-13 17:11 ` Steven Rostedt
2019-12-13 17:30 ` Alexei Starovoitov
2019-12-13 18:28 ` Jiri Olsa
2019-12-13 18:02 ` Peter Zijlstra
2019-12-13 18:29 ` Steven Rostedt
2019-12-13 18:36 ` Jiri Olsa [this message]
2019-12-13 18:43 ` Steven Rostedt
2019-12-13 18:46 ` Peter Zijlstra
2019-12-13 19:03 ` Steven Rostedt
2019-12-13 19:05 ` Steven Rostedt
2019-12-14 11:35 ` Jiri Olsa
2019-12-18 16:14 ` Jiri Olsa
2019-12-18 16:22 ` 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=20191213183646.GB8994@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=jolsa@kernel.org \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=quentin.monnet@netronome.com \
--cc=rostedt@goodmis.org \
--cc=songliubraving@fb.com \
--cc=toke@redhat.com \
--cc=yhs@fb.com \
/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).