From: Jiri Olsa <jolsa@redhat.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>
Subject: Re: perf: behavior of poll() changed in 3.18
Date: Thu, 22 Jan 2015 14:34:55 +0100 [thread overview]
Message-ID: <20150122133455.GC2473@krava.brq.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1501220026210.12767@vincent-weaver-1.umelst.maine.edu>
On Thu, Jan 22, 2015 at 01:53:35AM -0500, Vince Weaver wrote:
> On Wed, 21 Jan 2015, Jiri Olsa wrote:
> >
> > However if we revert this code, we'll loose nice (and standard) way
> > to check if the event is still valid.. not sure how to handle this.
>
> there's likely no need to revert as my code wasn't really released and
> I've already fixed it to work with the new interface.
>
> I was mostly asking just so I could update the manpage to explain the new
> behavior, as tools that expect to be backwards compatible will have to
> handle both ways of detecting a process dieing.
>
> > > Part of why my code doesn't just exit on POLLHUP is because you can
> > > get that result for reasons other than a process exit (for example,
> > > if you are using ioctl(PERF_EVENT_IOC_REFRESH)
> >
> > Nope, this is related to POOL_HUP (notice the '_') which you'll get
> > accompanied with SIGIO if you setup this.
>
> So what happens if you are using a signal handler to monitor a child and
> the child exits?
AFAICS wrt to SIGIO, we notify only with POLL_IN if there's new data
and POLL_HUP if we reached the event_limit - the one you set with
PERF_EVENT_IOC_REFRESH ioctl
>
> It's a shame the poll and signal handler interfaces are subtly different,
> though I guess some of that is probably due to historical reasons.
I've actually never used the SIGIO interface in perf other than
when I was checking your gi repo with test code ;-)
so I'm not sure what the correct behaviour should be when monitored
process dies.. I'd say we should send SIGIO with POLL_HUP, but that
clashes with that 'event_limit' thing.. I'll check on that
thanks,
jirka
next prev parent reply other threads:[~2015-01-22 13:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 17:03 Vince Weaver
2015-01-20 18:13 ` Jiri Olsa
2015-01-21 6:06 ` Vince Weaver
2015-01-21 16:21 ` Jiri Olsa
2015-01-22 6:53 ` Vince Weaver
2015-01-22 13:34 ` Jiri Olsa [this message]
2015-01-22 18:09 ` Vince Weaver
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=20150122133455.GC2473@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome