lkml.org 
[lkml]   [2010]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[RFC][PATCH v2 3/7] taskstats: Add thread group ID to taskstats structure
    From: Michael Holzheu <holzheu@linux.vnet.ibm.com>

    The tgid is important for aggregating threads in user space. Therefore we
    add the tgid to the taskstats structure.

    Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
    ---
    include/linux/taskstats.h | 1 +
    kernel/tsacct.c | 1 +
    2 files changed, 2 insertions(+)

    --- a/include/linux/taskstats.h
    +++ b/include/linux/taskstats.h
    @@ -167,6 +167,7 @@ struct taskstats {

    /* Timestamp where data has been collected in ns since boot time */
    __u64 time_ns;
    + __u32 ac_tgid; /* Thread group ID */
    };


    --- a/kernel/tsacct.c
    +++ b/kernel/tsacct.c
    @@ -56,6 +56,7 @@ void bacct_add_tsk(struct taskstats *sta
    stats->ac_nice = task_nice(tsk);
    stats->ac_sched = tsk->policy;
    stats->ac_pid = tsk->pid;
    + stats->ac_tgid = tsk->tgid;
    rcu_read_lock();
    tcred = __task_cred(tsk);
    stats->ac_uid = tcred->uid;


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