11 Dec, 2006

1 commit


31 Oct, 2006

1 commit


29 Oct, 2006

1 commit

  • 1. ts = timespec_sub(uptime, current->group_leader->start_time);

    It is possible that current != tsk. Probably it was supposed
    to be 'tsk->group_leader->start_time. But why we are reading
    group_leader's start_time ? This accounting is per thread,
    not per procees, I changed this to 'tsk->start_time.
    Please corect me.

    2. stats->ac_ppid = (tsk->parent) ? tsk->parent->pid : 0;

    tsk->parent never == NULL, and it is unsafe to dereference it.
    Both the task and it's parent may exit after the caller unlocks
    tasklist_lock, the memory could be unmapped (DEBUG_SLAB).
    (And we should use ->real_parent->tgid in fact).

    Q: I don't understand the 'if (thread_group_leader(tsk))' check.
    Why it is needed ?

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Acked-by: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

01 Oct, 2006

4 commits

  • ChangeLog:
    Feedbacks from Andrew Morton:
    - define TS_COMM_LEN to 32
    - change acct_stimexpd field of task_struct to be of
    cputime_t, which is to be used to save the tsk->stime
    of last timer interrupt update.
    - a new Documentation/accounting/taskstats-struct.txt
    to describe fields of taskstats struct.

    Feedback from Balbir Singh:
    - keep the stime of a task to be zero when both stime
    and utime are zero as recoreded in task_struct.

    Misc:
    - convert accumulated RSS/VM from platform dependent
    pages-ticks to MBytes-usecs in the kernel

    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jes Sorensen
    Cc: Chris Sturtivant
    Cc: Tony Ernst
    Cc: Guillaume Thouvenin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jay Lan
     
  • There were a few accounting data/macros that are used in CSA but are #ifdef'ed
    inside CONFIG_BSD_PROCESS_ACCT. This patch is to change those ifdef's from
    CONFIG_BSD_PROCESS_ACCT to CONFIG_TASK_XACCT. A few defines are moved from
    kernel/acct.c and include/linux/acct.h to kernel/tsacct.c and
    include/linux/tsacct_kern.h.

    Signed-off-by: Jay Lan
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jes Sorensen
    Cc: Chris Sturtivant
    Cc: Tony Ernst
    Cc: Guillaume Thouvenin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jay Lan
     
  • Add extended system accounting handling over taskstats interface. A
    CONFIG_TASK_XACCT flag is created to enable the extended accounting code.

    Signed-off-by: Jay Lan
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jes Sorensen
    Cc: Chris Sturtivant
    Cc: Tony Ernst
    Cc: Guillaume Thouvenin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jay Lan
     
  • Add some basic accounting fields to the taskstats struct, add a new
    kernel/tsacct.c to handle basic accounting data handling upon exit. A handle
    is added to taskstats.c to invoke the basic accounting data handling.

    Signed-off-by: Jay Lan
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jes Sorensen
    Cc: Chris Sturtivant
    Cc: Tony Ernst
    Cc: Guillaume Thouvenin
    Cc: "Michal Piotrowski"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jay Lan