<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/taskstats.c, branch v2.6.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2006-10-31T16:07:00Z</updated>
<entry>
<title>[PATCH] taskstats: fix sub-threads accounting</title>
<updated>2006-10-31T16:07:00Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-31T06:07:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a279ff1ea1cf325775ada983035123fcdc8e986'/>
<id>urn:sha1:4a279ff1ea1cf325775ada983035123fcdc8e986</id>
<content type='text'>
If there are no listeners, taskstats_exit_send() just returns because
taskstats_exit_alloc() didn't allocate *tidstats.  This is wrong, each
sub-thread should do fill_tgid_exit() on exit, otherwise its -&gt;delays is
not recorded in -&gt;signal-&gt;stats and lost.

Q: We don't send TASKSTATS_TYPE_AGGR_TGID when single-threaded process
exits.  Is it good?  How can the listener figure out that it was actually a
process exit, not sub-thread?

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Acked-by: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] taskstats: fix sk_buff size calculation</title>
<updated>2006-10-29T20:07:37Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-29T15:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d8334def5cf831d2ed438aae021696a2faa4ddd'/>
<id>urn:sha1:3d8334def5cf831d2ed438aae021696a2faa4ddd</id>
<content type='text'>
prepare_reply() adds GENL_HDRLEN to the payload (genlmsg_total_size()),
but then it does genlmsg_put()-&gt;nlmsg_put().  This means we forget to
reserve a room for 'struct nlmsghdr'.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Thomas Graf &lt;tgraf@suug.ch&gt;
Cc: Andrew Morton &lt;akpm@osdl.org&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: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] taskstats: fix sk_buff leak</title>
<updated>2006-10-29T20:07:37Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-29T13:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d46a3d0d07ba539aea5b0e1ad30e568f0cb03576'/>
<id>urn:sha1:d46a3d0d07ba539aea5b0e1ad30e568f0cb03576</id>
<content type='text'>
'return genlmsg_cancel()' in taskstats_user_cmd/taskstats_exit_send
potentially leaks a skb.  Unless we pass 'rep_skb' to the netlink layer
we own sk_buff.  This means we should always do kfree_skb() on failure.

[ Thomas acked and pointed out missing return value in original version ]

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Acked-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Cc: Andrew Morton &lt;akpm@osdl.org&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: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] fill_tgid: cleanup delays accounting</title>
<updated>2006-10-28T18:30:55Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-28T17:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7c3f5f231c60d7e6ada5770b536df2b3ec1bd08'/>
<id>urn:sha1:d7c3f5f231c60d7e6ada5770b536df2b3ec1bd08</id>
<content type='text'>
fill_tgid() should skip not only an already exited group leader.  If the
task has -&gt;exit_state != 0 it already did exit_notify(), so it also did
fill_tgid_exit()-&gt;delayacct_add_tsk(-&gt;signal-&gt;stats) and we should skip it
to avoid a double accounting.

This patch doesn't close the race completely, but it cleanups the code.

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>
</entry>
<entry>
<title>[PATCH] taskstats: don't use tasklist_lock</title>
<updated>2006-10-28T18:30:54Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-28T17:38:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a98b6094261c0112e9c455c96995972181bff049'/>
<id>urn:sha1:a98b6094261c0112e9c455c96995972181bff049</id>
<content type='text'>
Remove tasklist_lock from taskstats.c. find_task_by_pid() is rcu-safe.
-&gt;siglock allows us to traverse subthread without tasklist.

Q: delay accounting looks wrong to me.  If sub-thread has already called
taskstats_exit_send() but didn't call release_task(self) yet it will be
accounted twice.  The window is big.  No?

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>
</entry>
<entry>
<title>[PATCH] taskstats: kill -&gt;taskstats_lock in favor of -&gt;siglock</title>
<updated>2006-10-28T18:30:54Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-28T17:38:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8534d7bd89df0cd41cd47bcd6733a05ea9a691a'/>
<id>urn:sha1:b8534d7bd89df0cd41cd47bcd6733a05ea9a691a</id>
<content type='text'>
signal_struct is (mostly) protected by -&gt;sighand-&gt;siglock, I think we don't
need -&gt;taskstats_lock to protect -&gt;stats.  This also allows us to simplify the
locking in fill_tgid().

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>
</entry>
<entry>
<title>[PATCH] fill_tgid: fix task_struct leak and possible oops</title>
<updated>2006-10-28T18:30:54Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2006-10-28T17:38:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fca178c0c6e8d52a1875be36b070f30884ebfae9'/>
<id>urn:sha1:fca178c0c6e8d52a1875be36b070f30884ebfae9</id>
<content type='text'>
1. fill_tgid() forgets to do put_task_struct(first).

2. release_task(first) can happen after fill_tgid() drops tasklist_lock,
   it is unsafe to dereference first-&gt;signal.

This is a temporary fix, imho the locking should be reworked.

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;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] csa: Extended system accounting over taskstats</title>
<updated>2006-10-01T07:39:29Z</updated>
<author>
<name>Jay Lan</name>
<email>jlan@engr.sgi.com</email>
</author>
<published>2006-10-01T06:28:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9acc1853519a0473620d424105f9d49ea5b4e62e'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>[PATCH] csa: basic accounting over taskstats</title>
<updated>2006-10-01T07:39:29Z</updated>
<author>
<name>Jay Lan</name>
<email>jlan@engr.sgi.com</email>
</author>
<published>2006-10-01T06:28:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3cef7a99469afc159fec3a61b42dc7ca5b6824f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>[PATCH] Fix taskstats size calculation (use the new genetlink utility functions)</title>
<updated>2006-10-01T07:39:29Z</updated>
<author>
<name>Balbir Singh</name>
<email>balbir@in.ibm.com</email>
</author>
<published>2006-10-01T06:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ae646845b603e9df5711084436d389f8371ffb3'/>
<id>urn:sha1:0ae646845b603e9df5711084436d389f8371ffb3</id>
<content type='text'>
The addition of the CSA patch pushed the size of struct taskstats to 256
bytes.  This exposed a problem with prepare_reply(), we were not allocating
space for the netlink and genetlink header.  It worked earlier because
alloc_skb() would align the skb to SMP_CACHE_BYTES, which added some additonal
bytes.

Signed-off-by: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jamal Hadi &lt;hadi@cyberus.ca&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Thomas Graf &lt;tgraf@suug.ch&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Jay Lan &lt;jlan@engr.sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
