19 Oct, 2007

1 commit

  • This adds items to the taststats struct to account for user and system
    time based on scaling the CPU frequency and instruction issue rates.

    Adds account_(user|system)_time_scaled callbacks which architectures
    can use to account for time using this mechanism.

    Signed-off-by: Michael Neuling
    Cc: Balbir Singh
    Cc: Jay Lan
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Neuling
     

26 Jul, 2007

1 commit

  • This avoids use of the kernel-internal "xtime" variable directly outside
    of the actual time-related functions. Instead, use the helper functions
    that we already have available to us.

    This doesn't actually change any behaviour, but this will allow us to
    fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
    (because much of the realtime information is maintained as separate
    offsets to 'xtime'), which has caused interfaces that use xtime directly
    to get a time that is out of sync with the real-time clock by up to a
    third of a second or so.

    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    john stultz
     

17 Feb, 2007

1 commit

  • In preparation for the x86_64 generic time conversion, this patch splits out
    TSC and HPET related code from arch/x86_64/kernel/time.c into respective
    hpet.c and tsc.c files.

    [akpm@osdl.org: fix printk timestamps]
    [akpm@osdl.org: cleanup]
    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

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