All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <rric@kernel.org>
To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
	Stephane Eranian <eranian@google.com>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [RFC v2 1/7] perf: add data_{offset,size} to user_page
Date: Fri, 13 Jun 2014 15:51:50 +0200	[thread overview]
Message-ID: <20140613135150.GC27560@rric.localhost> (raw)
In-Reply-To: <1402501310-31940-2-git-send-email-alexander.shishkin@linux.intel.com>

On 11.06.14 18:41:44, Alexander Shishkin wrote:

> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index 853bc1c..ef95af4 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -488,9 +488,14 @@ struct perf_event_mmap_page {
>  	 * In this case the kernel will not over-write unread data.
>  	 *
>  	 * See perf_output_put_handle() for the data ordering.
> +	 *
> +	 * data_{offset,size} indicate the location and size of the perf record
> +	 * buffer within the mmapped area.
>  	 */
>  	__u64   data_head;		/* head in the data section */
>  	__u64	data_tail;		/* user-space written tail */
> +	__u64	data_offset;		/* where the buffer starts */
> +	__u64	data_size;		/* data buffer size */
>  };
>  

Yes, right. This change is useful to determine the buffer size for
existing buffers to be able to share them (e.g. persistent events).

If the buffer size is not known by userspace The mechanism would be to
mmap the header page only and later remap the buffer with the correct
buffer size determined from the header page.

If there are no objections on this patch it would be good if this
patch could be applied independently of the status of the follow on
patches.

Thanks,

-Robert

  reply	other threads:[~2014-06-13 13:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 15:41 [RFC v2 0/7] perf: perf: add AUX space to ring_buffer Alexander Shishkin
2014-06-11 15:41 ` [RFC v2 1/7] perf: add data_{offset,size} to user_page Alexander Shishkin
2014-06-13 13:51   ` Robert Richter [this message]
2014-06-11 15:41 ` [RFC v2 2/7] perf: add AUX area to ring buffer for raw data streams Alexander Shishkin
2014-06-24 17:19   ` Peter Zijlstra
2014-06-25 11:09     ` Alexander Shishkin
2014-06-25 12:11       ` Peter Zijlstra
2014-06-11 15:41 ` [RFC v2 3/7] perf: support high-order allocations for AUX space Alexander Shishkin
2014-06-11 15:41 ` [RFC v2 4/7] perf: add a capability for AUX_NO_SG pmus to do software double buffering Alexander Shishkin
2014-06-11 15:41 ` [RFC v2 5/7] perf: add a pmu capability for "exclusive" events Alexander Shishkin
2014-06-24 17:18   ` Peter Zijlstra
2014-06-25 11:12     ` Alexander Shishkin
2014-06-11 15:41 ` [RFC v2 6/7] perf: add api for pmus to write to AUX space Alexander Shishkin
2014-06-24 17:27   ` Peter Zijlstra
2014-06-25 11:24     ` Alexander Shishkin
2014-06-25 12:12       ` Peter Zijlstra
2014-06-11 15:41 ` [RFC v2 7/7] perf: add AUX record Alexander Shishkin

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=20140613135150.GC27560@rric.localhost \
    --to=rric@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.