mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Donnefort <vdonnefort@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org,
	mathieu.desnoyers@efficios.com, kernel-team@android.com
Subject: Re: [PATCH v12 2/6] ring-buffer: Introducing ring-buffer mapping functions
Date: Tue, 23 Jan 2024 17:48:17 +0000	[thread overview]
Message-ID: <Za_74T-IJWAa6fny@google.com> (raw)
In-Reply-To: <20240123105149.36abf019@gandalf.local.home>

On Tue, Jan 23, 2024 at 10:51:49AM -0500, Steven Rostedt wrote:
> On Tue, 23 Jan 2024 11:07:53 +0000
> Vincent Donnefort <vdonnefort@google.com> wrote:
> 
> > index 000000000000..5468afc94be7
> > --- /dev/null
> > +++ b/include/uapi/linux/trace_mmap.h
> > @@ -0,0 +1,44 @@
> > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> > +#ifndef _TRACE_MMAP_H_
> > +#define _TRACE_MMAP_H_
> > +
> > +#include <linux/types.h>
> > +
> > +/**
> > + * struct trace_buffer_meta - Ring-buffer Meta-page description
> > + * @meta_page_size:	Size of this meta-page.
> > + * @meta_struct_len:	Size of this structure.
> > + * @subbuf_size:	Size of each subbuf, including the header.
> > + * @nr_subbufs:		Number of subbfs in the ring-buffer.
> > + * @reader.lost_events:	Number of events lost at the time of the reader swap.
> > + * @reader.id:		subbuf ID of the current reader. From 0 to @nr_subbufs - 1
> > + * @reader.read:	Number of bytes read on the reader subbuf.
> > + * @entries:		Number of entries in the ring-buffer.
> > + * @overrun:		Number of entries lost in the ring-buffer.
> > + * @read:		Number of entries that have been read.
> 
> 
> > + * @subbufs_touched:	Number of subbufs that have been filled.
> > + * @subbufs_lost:	Number of subbufs lost to overrun.
> > + * @subbufs_read:	Number of subbufs that have been read.
> 
> Do we actually need the above 3 fields?
> 
> What's the use case for them? I don't want to expose internals in the API
> unless they are needed.

subbufs_read is gone, I just forgot to remove it here :-\.

The two other ones are used for tracing with the hypervisor. That's why I
preemptively added them. 

I can remove them and add just append this struct later ... or just overload
this struct with another one, only shared between the kernel and the hypervisor?

> 
> -- Steve

  reply	other threads:[~2024-01-23 17:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 11:07 [PATCH v12 0/6] Introducing trace buffer mapping by user-space Vincent Donnefort
2024-01-23 11:07 ` [PATCH v12 1/6] ring-buffer: Zero ring-buffer sub-buffers Vincent Donnefort
2024-01-23 11:07 ` [PATCH v12 2/6] ring-buffer: Introducing ring-buffer mapping functions Vincent Donnefort
2024-01-23 15:51   ` Steven Rostedt
2024-01-23 17:48     ` Vincent Donnefort [this message]
2024-01-23 18:02       ` Steven Rostedt
2024-01-23 11:07 ` [PATCH v12 3/6] tracing: Add snapshot refcount Vincent Donnefort
2024-01-24 15:11   ` Masami Hiramatsu
2024-01-25 14:53     ` Vincent Donnefort
2024-01-26  0:32       ` Masami Hiramatsu
2024-01-26  0:42       ` [PATCH] tracing/trigger: Fix to return error if failed to alloc snapshot Masami Hiramatsu (Google)
2024-01-26 16:58         ` Steven Rostedt
2024-01-26  2:01   ` [PATCH v12 3/6] tracing: Add snapshot refcount kernel test robot
2024-01-26  2:21   ` kernel test robot
2024-01-23 11:07 ` [PATCH v12 4/6] tracing: Allow user-space mapping of the ring-buffer Vincent Donnefort
2024-01-23 11:07 ` [PATCH v12 5/6] Documentation: tracing: Add ring-buffer mapping Vincent Donnefort
2024-01-23 11:07 ` [PATCH v12 6/6] ring-buffer/selftest: Add ring-buffer mapping test Vincent Donnefort

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=Za_74T-IJWAa6fny@google.com \
    --to=vdonnefort@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --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

all inboxes | Powered by JetHome®