mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/1] kernel/events: Introduce IOC_COUNT_RECORDS
Date: Tue, 6 Jun 2017 23:02:31 +0530	[thread overview]
Message-ID: <20170606173231.GD19390@naverao1-tp.localdomain> (raw)
In-Reply-To: <20170606162537.yapgt72mp3wxr4h7@hirez.programming.kicks-ass.net>

On 2017/06/06 06:25PM, Peter Zijlstra wrote:
> On Tue, Jun 06, 2017 at 08:21:18PM +0530, Naveen N. Rao wrote:
> > Many perf sideband events (context switches, namespaces, ...) are useful
> > by themselves without the need for subscribing to any overflow events.
> > However, it is not possible to subscribe for notifications when such
> > records are logged into the ring buffer. Introduce IOC_COUNT_RECORDS as
> > a way to request this.
> > 
> > With IOC_COUNT_RECORDS set, IOC_REFRESH takes the number of records
> > after which to generate a notification, rather than the number of
> > overflow events.
> > 
> > Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> > ---
> >  include/linux/perf_event.h      |  1 +
> >  include/uapi/linux/perf_event.h |  1 +
> >  kernel/events/core.c            | 16 +++++++++++++++-
> >  kernel/events/ring_buffer.c     |  9 +++++++++
> >  4 files changed, 26 insertions(+), 1 deletion(-)
> > 
> > diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> > index 24a635887f28..016f2da2bba7 100644
> > --- a/include/linux/perf_event.h
> > +++ b/include/linux/perf_event.h
> > @@ -683,6 +683,7 @@ struct perf_event {
> >  	struct irq_work			pending;
> >  
> >  	atomic_t			event_limit;
> > +	bool				count_records;
> 
> This is an instant nack ;-) Never, that is _never_ use bool in composite
> types.

Ouch! Sorry.
I did briefly consider labeling this 'EARLY RFC', but that still 
wouldn't have done justice :/

Thanks for the review,
- Naveen

  reply	other threads:[~2017-06-06 17:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 14:51 Naveen N. Rao
2017-06-06 16:25 ` Peter Zijlstra
2017-06-06 17:32   ` Naveen N. Rao [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-06-06 14:49 [RFC PATCH 0/1] Notifications for perf sideband events Naveen N. Rao
2017-06-06 15:16 ` [RFC PATCH 1/1] kernel/events: Introduce IOC_COUNT_RECORDS Naveen N. Rao
2017-06-06 15:51   ` Arnaldo Carvalho de Melo
2017-06-06 16:56     ` Naveen N. Rao
2017-06-06 16:17   ` Peter Zijlstra
2017-06-06 17:12     ` Naveen N. Rao

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=20170606173231.GD19390@naverao1-tp.localdomain \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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®