lkml.org 
[lkml]   [2010]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Q: perf_event && event->owner
    From
    Date
    On Tue, 2010-11-09 at 17:58 +0100, Oleg Nesterov wrote:
    > On 11/09, Peter Zijlstra wrote:
    > >
    > > On Tue, 2010-11-09 at 16:57 +0100, Oleg Nesterov wrote:
    > > >
    > > > If the creator of perf_event dies, nobody can use its ->perf_event_list
    > > > anyway. What is the point to keep the reference to the dead task_struct
    > > > and preserve this ->perf_event_list?
    > >
    > > But when the owner dies it will close all its fds, which means it will
    > > clear its tsk->perf_event_list, no? (With exception of the case where
    > > the fd was passed through a unix-socket to another process).
    >
    > fork(), pthread_create(). Only __fput() calls ->release, when the last
    > reference to file goes away.

    Ah,.. quite so. So how about we explicitly destroy the list when the
    task dies?

    > And ptrace(), it doesn't use sys_perf_event_open() to create the event.

    Right, I guess it uses kernel based things, I guess we could not add
    kernel based counters to the list.


    \
     
     \ /
      Last update: 2010-11-09 18:11    [W:0.019 / U:154.840 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site