Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-26 Thread Balbir Singh
On Sun, Mar 26, 2006 at 09:05:18AM -0500, jamal wrote: > On Sat, 2006-25-03 at 23:52 +0530, Balbir Singh wrote: > > > > No, we cannot have both passed. If we pass both a PID and a TGID and > > then the code returns just the stats for the PID. > > > > ok, that clears it then; i think you are rea

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-26 Thread jamal
On Sat, 2006-25-03 at 23:52 +0530, Balbir Singh wrote: > No, we cannot have both passed. If we pass both a PID and a TGID and > then the code returns just the stats for the PID. > ok, that clears it then; i think you are ready to go. > > > > Also in regards to the nesting, isnt there a need fo

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread Balbir Singh
On 3/25/06, jamal <[EMAIL PROTECTED]> wrote: > On Sat, 2006-25-03 at 21:06 +0530, Balbir Singh wrote: > > On Sat, Mar 25, 2006 at 07:52:13AM -0500, jamal wrote: > > > I didnt pay attention to failure paths etc; i suppose your testing > should catch those. Getting there, a couple more comments: > Y

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread jamal
On Sat, 2006-25-03 at 21:06 +0530, Balbir Singh wrote: > On Sat, Mar 25, 2006 at 07:52:13AM -0500, jamal wrote: I didnt pay attention to failure paths etc; i suppose your testing should catch those. Getting there, a couple more comments: > +enum { > + TASKSTATS_CMD_UNSPEC = 0, /* Rese

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread Balbir Singh
On Sat, Mar 25, 2006 at 07:52:13AM -0500, jamal wrote: > On Sat, 2006-25-03 at 15:11 +0530, Balbir Singh wrote: > > > > > Thanks for the advice, I will dive into nesting. I could not find any > > in tree users who use nesting, so I have a few questions > > > > Hrm - I have to say i am suprised

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread jamal
On Sat, 2006-25-03 at 15:11 +0530, Balbir Singh wrote: > > Thanks for the advice, I will dive into nesting. I could not find any > in tree users who use nesting, so I have a few questions > Hrm - I have to say i am suprised theres nothing; i could have sworn Thomas had done some conversions al

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread Balbir Singh
On Fri, Mar 24, 2006 at 08:19:25PM -0500, jamal wrote: > On Fri, 2006-24-03 at 20:24 +0530, Balbir Singh wrote: > > > Hmm... Would it be ok to send one message with the following format > > > > 1. TLV=TASKSTATS_TYPE_PID > > 2. TLV=TASKSTATS_TYPE_STATS > > 3. TLV=TASKSTATS_TYPE_TGID > > 4. TLV=TAS

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread jamal
On Fri, 2006-24-03 at 20:24 +0530, Balbir Singh wrote: > Hmm... Would it be ok to send one message with the following format > > 1. TLV=TASKSTATS_TYPE_PID > 2. TLV=TASKSTATS_TYPE_STATS > 3. TLV=TASKSTATS_TYPE_TGID > 4. TLV=TASKSTATS_TYPE_STATS > > It would still be one message, except that 3 and

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread Balbir Singh
On Fri, Mar 24, 2006 at 09:11:58AM -0500, jamal wrote: > On Fri, 2006-24-03 at 07:02 +0530, Balbir Singh wrote: > > On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: > > > 3. nlmsg_new() now allocates for 2*u32 + sizeof(taskstats) > > Not the right size; the u32 covers the V part of TLV. The

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread Balbir Singh
On Fri, Mar 24, 2006 at 09:04:21AM -0500, jamal wrote: > On Thu, 2006-23-03 at 21:11 +0530, Balbir Singh wrote: > > On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: > > > > Should there be at least either a pid or tgid? If yes, you need to > > > validate here... > > > > > > > Yes, you are c

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread jamal
On Fri, 2006-24-03 at 09:11 -0500, jamal wrote: > Look at using proper macros instead of hard coding like you did. > grep for something like RTA_SPACE and perhaps send a patch to make it > generic for netlink.h > actually Thomas already has this in netlink.h Look at using things like: nla_attr_s

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread jamal
On Thu, 2006-23-03 at 21:11 +0530, Balbir Singh wrote: > On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: > > Should there be at least either a pid or tgid? If yes, you need to > > validate here... > > > > Yes, you are correct. One of my test cases caught it too.. But I did > not want to un

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread jamal
On Fri, 2006-24-03 at 07:02 +0530, Balbir Singh wrote: > On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: > 3. nlmsg_new() now allocates for 2*u32 + sizeof(taskstats) Not the right size; the u32 covers the V part of TLV. The T = 16 bits and L = 16 bits. And if you nest TLVs, then it gets mo

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-23 Thread Balbir Singh
On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: > > Hi Balbir, > > Looking good. > This is a quick scan, so i didnt look at little details. > Some comments embedded. Hi, Jamal, I tried addressing your comments in this new version. Changelog - 1. Moved TASKSTATS_MSG_* to under #i

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-23 Thread Balbir Singh
On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: > > Hi Balbir, > > Looking good. > This is a quick scan, so i didnt look at little details. Thanks for your detailed feedback. Please find my response interspersed along with your comments. > Some comments embedded. > > On Wed, 2006-22-03

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-23 Thread jamal
Hi Balbir, Looking good. This is a quick scan, so i didnt look at little details. Some comments embedded. On Wed, 2006-22-03 at 13:19 +0530, Balbir Singh wrote: > > diff -puN /dev/null include/linux/taskstats.h > + * The struct is versioned. Newer versions should only add fields to > + *

[RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-21 Thread Balbir Singh
On Mon, Mar 13, 2006 at 09:48:26PM -0500, jamal wrote: > On Mon, 2006-13-03 at 18:33 -0800, Matt Helsley wrote: > > On Mon, 2006-03-13 at 19:56 -0500, Shailabh Nagar wrote: > > > I had a long description in an earlier email feedback; but the summary > of it is the GET command is generic like TASK

Re: [Patch 9/9] Generic netlink interface for delay accounting

2006-03-13 Thread Shailabh Nagar
Matt Helsley wrote: On Mon, 2006-03-13 at 19:56 -0500, Shailabh Nagar wrote: Comments addressed (all in response to Jamal) - Eliminated TASKSTATS_CMD_LISTEN and TASKSTATS_CMD_IGNORE The enums for these are still in the patch. See below. +/* + * Commands sent from userspace +

Re: [Patch 9/9] Generic netlink interface for delay accounting

2006-03-13 Thread Shailabh Nagar
jamal wrote: On Mon, 2006-13-03 at 18:33 -0800, Matt Helsley wrote: On Mon, 2006-03-13 at 19:56 -0500, Shailabh Nagar wrote: Jamal, was your Mon, 13 Mar 2006 21:29:09 -0500 reply: Note, you are still not following the standard scheme of doing things. Example: using command =

Re: [Patch 9/9] Generic netlink interface for delay accounting

2006-03-13 Thread jamal
On Mon, 2006-13-03 at 18:33 -0800, Matt Helsley wrote: > On Mon, 2006-03-13 at 19:56 -0500, Shailabh Nagar wrote: > Jamal, was your Mon, 13 Mar 2006 21:29:09 -0500 reply: > > Note, you are still not following the standard scheme of doing things. > > Example: using command = GET and the message car

Re: [Patch 9/9] Generic netlink interface for delay accounting

2006-03-13 Thread Matt Helsley
On Mon, 2006-03-13 at 19:56 -0500, Shailabh Nagar wrote: > Comments addressed (all in response to Jamal) > > - Eliminated TASKSTATS_CMD_LISTEN and TASKSTATS_CMD_IGNORE The enums for these are still in the patch. See below. > +/* > + * Commands sent from userspace > + * Not versioned. New com

Re: [Patch 9/9] Generic netlink interface for delay accounting

2006-03-13 Thread jamal
On Mon, 2006-13-03 at 19:56 -0500, Shailabh Nagar wrote: > delayacct-genetlink.patch > > Create a generic netlink interface (NETLINK_GENERIC family), > called "taskstats", for getting delay and cpu statistics of > tasks and thread groups during their lifetime and when they exit. > > Comments a

[Patch 9/9] Generic netlink interface for delay accounting

2006-03-13 Thread Shailabh Nagar
delayacct-genetlink.patch Create a generic netlink interface (NETLINK_GENERIC family), called "taskstats", for getting delay and cpu statistics of tasks and thread groups during their lifetime and when they exit. Comments addressed (all in response to Jamal) - Eliminated TASKSTATS_CMD_LISTEN