Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1658978
| From | "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 1/1] kernel/events: Introduce IOC_COUNT_RECORDS |
| Date | 2017-06-06 19:40 +0200 |
| Message-ID | <tPqCv-3oY-45@gated-at.bofh.it> (permalink) |
| References | <tPo7D-1Hh-11@gated-at.bofh.it> <tPpwJ-2JZ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH 1/1] kernel/events: Introduce IOC_COUNT_RECORDS "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-06-06 17:00 +0200
Re: [RFC PATCH 1/1] kernel/events: Introduce IOC_COUNT_RECORDS Peter Zijlstra <peterz@infradead.org> - 2017-06-06 18:30 +0200
Re: [RFC PATCH 1/1] kernel/events: Introduce IOC_COUNT_RECORDS "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> - 2017-06-06 19:40 +0200
csiph-web