All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Jiri Olsa <jolsa@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] kernel/events: Add option to notify through signals on wakeup
Date: Fri, 4 Aug 2017 13:37:48 +0530	[thread overview]
Message-ID: <20170804080748.c3lxlsbim4tzg45y@naverao1-tp.localdomain> (raw)
In-Reply-To: <alpine.DEB.2.20.1708031355400.26654@macbook-air>

Hi Vince,
Thanks for taking a look.

On 2017/08/03 01:57PM, Vince Weaver wrote:
> On Tue, 1 Aug 2017, Naveen N. Rao wrote:
> 
> > Add a new option 'signal_on_wakeup' to request for a signal to be
> > delivered on ring buffer wakeup controlled through watermark and
> > {wakeup_events, wakeup_watermark}. HUP is signaled on exit.
> > 
> > Setting signal_on_wakeup disables use of IOC_REFRESH to control signal
> > delivery, instead relying on IOC_ENABLE/DISABLE.
> 
> so I probably missed the original thread on this new interface, but why is 
> IOC_REFRESH not being used?

IOC_REFRESH is used to control the number of overflows before disabling 
the event. It works outside of perf_event_attr in the sense that it 
enables POLL_IN on each overflow and user specifies the number of 
overflows after which to disable the event as part of the ioctl (when 
HUP is signaled).

However, signal_on_wakeup is designed to work with the values in the 
perf_event_attr structure itself. wakeup_events controls the number of 
events after which to signal POLL_IN. signal_on_wakeup itself needs to 
be specified in the perf_event_attr. As such, I felt it is better to 
have all control through perf_event_attr.

But, if you think having IOC_REFRESH available in this scenario is 
useful, we can revisit this. Ideally, we would have separate ioctls to 
control signal delivery separate from perf_event_attr, but I am not sure 
how useful that would be.

> 
> For new interfaces like this it's also nice to have some text that can be 
> added to the perf_event_open() manpage, especially if there's weird 
> conditions like this.

Sure -- I will send an update to the manpage once this series gets 
accepted.

Thanks,
Naveen

  reply	other threads:[~2017-08-04  8:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 14:44 [PATCH v2 0/2] Notifications for perf sideband events Naveen N. Rao
2017-08-01 14:44 ` [PATCH v2 1/2] kernel/events: Add option to notify through signals on wakeup Naveen N. Rao
2017-08-03 17:57   ` Vince Weaver
2017-08-04  8:07     ` Naveen N. Rao [this message]
2017-08-04 10:20   ` Peter Zijlstra
2017-08-04 17:30     ` Naveen N. Rao
2017-08-01 14:44 ` [PATCH v2 2/2] kernel/events: Add option to enable counting sideband events in wakeup_events Naveen N. Rao
2017-08-04 10:59   ` Peter Zijlstra
2017-08-04 18:13     ` 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=20170804080748.c3lxlsbim4tzg45y@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 \
    --cc=vincent.weaver@maine.edu \
    /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.