lkml.org 
[lkml]   [2014]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/5] perf: Destroy event's children on task exit
    On Fri, Jul 11, 2014 at 03:23:09PM +0200, Peter Zijlstra wrote:
    > On Fri, Jul 11, 2014 at 01:56:19PM +0200, Jiri Olsa wrote:
    > > From: Jiri Olsa <jolsa@redhat.com>
    > >
    > > When task exits we close:
    > > 1) all events that are installed in task
    > > 2) all events owned by task (via file descriptor)
    > >
    > > But we don't close children events of 2) events. Those children
    > > events stay until the child task exits and are useless with the
    > > parent being gone, because we have no way to get to values any
    > > more.
    > >
    > > Plus if the event stays installed in task even with the owner task
    > > gone, it runs the perf callback any time the task forks, for no
    > > real reason.
    > >
    > > Closing all children events events when the owner task of the
    > > parent event is closed.
    >
    > So I _think_ the reason we didn't do this is because this is potentially
    > very expensive and keeping them around isn't too much bother, they'll
    > die eventually.

    yep, they will.. but until then the task they are installed
    in will continue having them and clone them on each fork

    also for each such fork there's the permission check for inherited
    tracepoint event, which we canot make without the owner task

    so I ended up with closing all the children

    jirka


    \
     
     \ /
      Last update: 2014-07-11 16:01    [W:4.790 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site