lkml.org 
[lkml]   [2015]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: perf: behavior of poll() changed in 3.18
On Thu, 22 Jan 2015, Jiri Olsa wrote:

> > 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

I wrote a test for this: if you are monitoring another process with a
SIGIO handler and the other process dies, then you get no signal for this
at all, and in fact depending on the timing the last valid SIGIO overflow
event signal might get lost (in my test I usually get one fewer
POLL_IN signal than I would get from the equivelent poll() code).

> I've actually never used the SIGIO interface in perf other than
> when I was checking your gi repo with test code ;-)

Yes, it seems that PAPI is really the only infrastructure that tries to do
self-monitoring using the SIGIO interface. Which shows, as it breaks now
and then. That was the whole reason I started writing my perf_event_test
infrastructure in the first place.

Vince


\
 
 \ /
  Last update: 2015-01-22 19:21    [W:0.042 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site