<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/tsacct.c, branch v2.6.20-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[PATCH] io-accounting: via taskstats</title>
<updated>2006-12-10T17:55:41+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-12-10T10:19:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a7864ca638e0a38307962ee8ef122822a351b65'/>
<id>4a7864ca638e0a38307962ee8ef122822a351b65</id>
<content type='text'>
Deliver IO accounting via taskstats.

Cc: Jay Lan &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Cc: David Wright &lt;daw@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deliver IO accounting via taskstats.

Cc: Jay Lan &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Cc: David Wright &lt;daw@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] xacct_add_tsk: fix pure theoretical -&gt;mm use-after-free</title>
<updated>2006-10-30T20:08:41+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-30T06:46:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f0ec1aaf54caddd21c259aea8b2ecfbde4ee4fb9'/>
<id>f0ec1aaf54caddd21c259aea8b2ecfbde4ee4fb9</id>
<content type='text'>
Paranoid fix. The task can free its -&gt;mm after the 'if (p-&gt;mm)' check.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jay Lan &lt;jlan@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Paranoid fix. The task can free its -&gt;mm after the 'if (p-&gt;mm)' check.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jay Lan &lt;jlan@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] bacct_add_tsk: fix unsafe and wrong parent/group_leader dereference</title>
<updated>2006-10-28T18:30:54+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-28T17:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=05d5bcd60e8202e5c7b28cf61186043a4d612623'/>
<id>05d5bcd60e8202e5c7b28cf61186043a4d612623</id>
<content type='text'>
1. ts = timespec_sub(uptime, current-&gt;group_leader-&gt;start_time);

   It is possible that current != tsk. Probably it was supposed
   to be 'tsk-&gt;group_leader-&gt;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-&gt;start_time.
   Please corect me.

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

   tsk-&gt;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 -&gt;real_parent-&gt;tgid in fact).

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

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Acked-by: Jay Lan &lt;jlan@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. ts = timespec_sub(uptime, current-&gt;group_leader-&gt;start_time);

   It is possible that current != tsk. Probably it was supposed
   to be 'tsk-&gt;group_leader-&gt;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-&gt;start_time.
   Please corect me.

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

   tsk-&gt;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 -&gt;real_parent-&gt;tgid in fact).

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

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Acked-by: Jay Lan &lt;jlan@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] csa accounting taskstats update</title>
<updated>2006-10-01T07:39:29+00:00</updated>
<author>
<name>Jay Lan</name>
<email>jlan@sgi.com</email>
</author>
<published>2006-10-01T06:29:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=db5fed26b2e0beed939b773dd5896077a1794d65'/>
<id>db5fed26b2e0beed939b773dd5896077a1794d65</id>
<content type='text'>
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-&gt;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 &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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-&gt;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 &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] csa: convert CONFIG tag for extended accounting routines</title>
<updated>2006-10-01T07:39:29+00:00</updated>
<author>
<name>Jay Lan</name>
<email>jlan@engr.sgi.com</email>
</author>
<published>2006-10-01T06:28:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f0ab5147951267134612570604cf8341901a80c'/>
<id>8f0ab5147951267134612570604cf8341901a80c</id>
<content type='text'>
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 &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] csa: Extended system accounting over taskstats</title>
<updated>2006-10-01T07:39:29+00:00</updated>
<author>
<name>Jay Lan</name>
<email>jlan@engr.sgi.com</email>
</author>
<published>2006-10-01T06:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9acc1853519a0473620d424105f9d49ea5b4e62e'/>
<id>9acc1853519a0473620d424105f9d49ea5b4e62e</id>
<content type='text'>
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 &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] csa: basic accounting over taskstats</title>
<updated>2006-10-01T07:39:29+00:00</updated>
<author>
<name>Jay Lan</name>
<email>jlan@engr.sgi.com</email>
</author>
<published>2006-10-01T06:28:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3cef7a99469afc159fec3a61b42dc7ca5b6824f'/>
<id>f3cef7a99469afc159fec3a61b42dc7ca5b6824f</id>
<content type='text'>
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 &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Cc: "Michal Piotrowski" &lt;michal.k.k.piotrowski@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Cc: "Michal Piotrowski" &lt;michal.k.k.piotrowski@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
