lkml.org 
[lkml]   [2011]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] Introduce ActivePid: in /proc/self/status (v2, was Vpid:)
    From
    Date
    On Thu, 2011-06-16 at 15:25 +0200, Louis Rilling wrote:
    > > Ok. You're right, the RCU grace period is just what I need to ensure
    > I
    > > won't dereference a stale pointer. So I don't even have to bother
    > with
    > > ->siglock and just check pid_alive() before peeking into
    > pid->numbers.
    >
    > It ends like open-coding an optimized version of task_pid_vnr(). If
    > the
    > optimization is really important (I guess this depends on the depth of
    > recursive
    > pid namespaces), it would be better to re-write task_pid_vnr().
    > Otherwise, just
    > use task_pid_vnr() as it is.
    >
    > Thanks,
    >
    > Louis
    >
    Hmm, sorry Louis but I'm looking for the pid number from the task active
    pid_ns (AKA. the return value of getpid() if called by this task), so
    task_pid_vnr() doesn't fit.

    About the open-coding argument, that's why I used task_pid_nr_ns() and
    task_active_pid_ns() at first...

    --
    Gregory Kurz gkurz@fr.ibm.com
    Software Engineer @ IBM/Meiosys http://www.ibm.com
    Tel +33 (0)534 638 479 Fax +33 (0)561 400 420

    "Anarchy is about taking complete responsibility for yourself."
    Alan Moore.



    \
     
     \ /
      Last update: 2011-06-16 17:05    [W:3.629 / U:0.440 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site