01 Oct, 2006

2 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
     
  • Fix the length passed while (un)registering cpumask. We were passing sizeof
    the array, make it strlen().

    Error value printed in fatal errors should be derived from the message. The
    message contains an nlmsgerr embedded with an error value. We must report
    that value to the user.

    Signed-off-by: Balbir Singh
    Cc: Jamal Hadi
    Cc: Shailabh Nagar
    Cc: Thomas Graf
    Cc: "David S. Miller"
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Balbir Singh
     

01 Aug, 2006

1 commit

  • Enable delay accounting by default so that feature gets coverage testing
    without requiring special measures.

    Earlier, it was off by default and had to be enabled via a boot time param.
    This patch reverses the default behaviour to improve coverage testing. It
    can be removed late in the kernel development cycle if its believed users
    shouldn't have to incur any cost if they don't want delay accounting. Or
    it can be retained forever if the utility of the stats is deemed common
    enough to warrant keeping the feature on.

    Signed-off-by: Shailabh Nagar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shailabh Nagar
     

15 Jul, 2006

4 commits

  • Change documentation and example program to reflect the flow control issues
    being addressed by the cpumask changes.

    Signed-off-by: Shailabh Nagar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shailabh Nagar
     
  • Send per-tgid data only once during exit of a thread group instead of once
    with each member thread exit.

    Currently, when a thread exits, besides its per-tid data, the per-tgid data
    of its thread group is also sent out, if its thread group is non-empty.
    The per-tgid data sent consists of the sum of per-tid stats for all
    *remaining* threads of the thread group.

    This patch modifies this sending in two ways:

    - the per-tgid data is sent only when the last thread of a thread group
    exits. This cuts down heavily on the overhead of sending/receiving
    per-tgid data, especially when other exploiters of the taskstats
    interface aren't interested in per-tgid stats

    - the semantics of the per-tgid data sent are changed. Instead of being
    the sum of per-tid data for remaining threads, the value now sent is the
    true total accumalated statistics for all threads that are/were part of
    the thread group.

    The patch also addresses a minor issue where failure of one accounting
    subsystem to fill in the taskstats structure was causing the send of
    taskstats to not be sent at all.

    The patch has been tested for stability and run cerberus for over 4 hours
    on an SMP.

    [akpm@osdl.org: bugfixes]
    Signed-off-by: Shailabh Nagar
    Signed-off-by: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shailabh Nagar
     
  • Some documentation for delay accounting.

    Signed-off-by: Shailabh Nagar
    Signed-off-by: Balbir Singh
    Cc: Jes Sorensen
    Cc: Peter Chubb
    Cc: Erich Focht
    Cc: Levent Serinol
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shailabh Nagar
     
  • Create a "taskstats" interface based on generic netlink (NETLINK_GENERIC
    family), for getting statistics of tasks and thread groups during their
    lifetime and when they exit. The interface is intended for use by multiple
    accounting packages though it is being created in the context of delay
    accounting.

    This patch creates the interface without populating the fields of the data
    that is sent to the user in response to a command or upon the exit of a task.
    Each accounting package interested in using taskstats has to provide an
    additional patch to add its stats to the common structure.

    [akpm@osdl.org: cleanups, Kconfig fix]
    Signed-off-by: Shailabh Nagar
    Signed-off-by: Balbir Singh
    Cc: Jes Sorensen
    Cc: Peter Chubb
    Cc: Erich Focht
    Cc: Levent Serinol
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shailabh Nagar