From: Balbir Singh <balbir@in.ibm.com>
To: jamal <hadi@cyberus.ca>
Cc: Shailabh Nagar <nagar@watson.ibm.com>,
netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
lse-tech@lists.sourceforge.net
Subject: Re: [UPDATED PATCH] Re: [Lse-tech] Re: [Patch 7/7] Generic netlink interface (delay accounting)
Date: Fri, 10 Mar 2006 22:09:27 +0530 [thread overview]
Message-ID: <20060310163927.GA6537@in.ibm.com> (raw)
In-Reply-To: <1142002433.5298.42.camel@jzny2>
On Fri, Mar 10, 2006 at 09:53:53AM -0500, jamal wrote:
> On Thu, 2006-09-03 at 20:07 +0530, Balbir Singh wrote:
> > Please let us know if we missed something out.
>
> Design still shaky IMO - now that i think i may understand what your end
> goal is.
> Using the principles i described in earlier email, the problem you are
> trying to solve is:
>
> a) shipping of the taskstats from kernel to user-space asynchronously to
> all listeners on multicast channel/group TASKSTATS_LISTEN_GRP
> at the point when some process exits.
> b) responding to queries issued by the user to the kernel for taskstats
> of a particular defined tgid and/or pid combination.
>
> Did i summarize your goals correctly?
Yes, you did.
>
> So lets stat with #b:
> i) the message is multicast; there has to be a user space app registered
> to the multicast group otherwise nothing goes to user space.
> ii) user space issues a GET and it seems to me the appropriate naming
> for the response is a NEW.
>
> Lets go to #a:
> The issued multicast messages are also NEW and no different from the
> ones sent in response to a GET.
>
> Having said that then, you have the following commands:
>
> enum {
> TASKSTATS_CMD_UNSPEC, /* Reserved */
> TASKSTATS_CMD_GET, /* user -> kernel query*/
> TASKSTATS_CMD_NEW, /* kernel -> user update */
> };
>
> You also need the following TLVs
>
> enum {
> TASKSTATS_TYPE_UNSPEC, /* Reserved */
> TASKSTATS_TYPE_TGID, /* The TGID */
> TASKSTATS_TYPE_PID, /* The PID */
> TASKSTATS_TYPE_STATS, /* carries the taskstats */
> TASKSTATS_TYPE_VERS, /* carries the version */
> };
>
> Refer to the doc i passed you and provide feedback if how to use the
> above is not obvious.
>
I will look at the document, just got hold of it.
> The use of TLVs above implies that any of these can be optionally
> appearing.
> So when you are going from user->kernel with a GET a in #a above, then
> you can specify the PID and/or TGID and you dont need to specify the
> STATS and this would be perfectly legal.
>
> On kernel->user (in the case of response to #a or async notifiation as
> in #b) you really dont need to specify the TG/PID since they appear in
> the STATS etc.
I see your point now. I am looking at other users of netlink like
rtnetlink and I see the classical usage.
We can implement TLV's in our code, but for the most part the data we exchange
between the user <-> kernel has all the TLV's listed in the enum above.
The major differnece is the type (pid/tgid). Hence we created a structure
(taskstats) instead of using TLV's.
> I take it you dont want to configure the values of taskstats from user
> space, otherwise user->kernel will send a NEW as well.
Your understanding is correct.
> I also take it dumping doesnt apply to you, so you dont need a dump
> callback in your kernel code.
Yes, this is correct as well.
> >From what i described so far, you dont really need a header for yourself
> either (maybe you need one to just store the VERSION?)
>
True, we do not need a header.
> I didnt understand the point to the err field you had in the reply.
> Netlink already does issue errors which can be read via perror. If this
> is different from what you need, it may be an excuse to have your own
> header.
>
Hmm.. Will look into this.
> I hope this helps.
>
Yes, it does immensely. Thanks for the detailed feedback.
> cheers,
> jamal
>
>
Warm Regards,
Balbir
WARNING: multiple messages have this Message-ID (diff)
From: Balbir Singh <balbir@in.ibm.com>
To: jamal <hadi@cyberus.ca>
Cc: Shailabh Nagar <nagar@watson.ibm.com>,
netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
lse-tech@lists.sourceforge.net
Subject: Re: [UPDATED PATCH] Re: Re: [Patch 7/7] Generic netlink interface (delay accounting)
Date: Fri, 10 Mar 2006 22:09:27 +0530 [thread overview]
Message-ID: <20060310163927.GA6537@in.ibm.com> (raw)
In-Reply-To: <1142002433.5298.42.camel@jzny2>
On Fri, Mar 10, 2006 at 09:53:53AM -0500, jamal wrote:
> On Thu, 2006-09-03 at 20:07 +0530, Balbir Singh wrote:
> > Please let us know if we missed something out.
>
> Design still shaky IMO - now that i think i may understand what your end
> goal is.
> Using the principles i described in earlier email, the problem you are
> trying to solve is:
>
> a) shipping of the taskstats from kernel to user-space asynchronously to
> all listeners on multicast channel/group TASKSTATS_LISTEN_GRP
> at the point when some process exits.
> b) responding to queries issued by the user to the kernel for taskstats
> of a particular defined tgid and/or pid combination.
>
> Did i summarize your goals correctly?
Yes, you did.
>
> So lets stat with #b:
> i) the message is multicast; there has to be a user space app registered
> to the multicast group otherwise nothing goes to user space.
> ii) user space issues a GET and it seems to me the appropriate naming
> for the response is a NEW.
>
> Lets go to #a:
> The issued multicast messages are also NEW and no different from the
> ones sent in response to a GET.
>
> Having said that then, you have the following commands:
>
> enum {
> TASKSTATS_CMD_UNSPEC, /* Reserved */
> TASKSTATS_CMD_GET, /* user -> kernel query*/
> TASKSTATS_CMD_NEW, /* kernel -> user update */
> };
>
> You also need the following TLVs
>
> enum {
> TASKSTATS_TYPE_UNSPEC, /* Reserved */
> TASKSTATS_TYPE_TGID, /* The TGID */
> TASKSTATS_TYPE_PID, /* The PID */
> TASKSTATS_TYPE_STATS, /* carries the taskstats */
> TASKSTATS_TYPE_VERS, /* carries the version */
> };
>
> Refer to the doc i passed you and provide feedback if how to use the
> above is not obvious.
>
I will look at the document, just got hold of it.
> The use of TLVs above implies that any of these can be optionally
> appearing.
> So when you are going from user->kernel with a GET a in #a above, then
> you can specify the PID and/or TGID and you dont need to specify the
> STATS and this would be perfectly legal.
>
> On kernel->user (in the case of response to #a or async notifiation as
> in #b) you really dont need to specify the TG/PID since they appear in
> the STATS etc.
I see your point now. I am looking at other users of netlink like
rtnetlink and I see the classical usage.
We can implement TLV's in our code, but for the most part the data we exchange
between the user <-> kernel has all the TLV's listed in the enum above.
The major differnece is the type (pid/tgid). Hence we created a structure
(taskstats) instead of using TLV's.
> I take it you dont want to configure the values of taskstats from user
> space, otherwise user->kernel will send a NEW as well.
Your understanding is correct.
> I also take it dumping doesnt apply to you, so you dont need a dump
> callback in your kernel code.
Yes, this is correct as well.
> >From what i described so far, you dont really need a header for yourself
> either (maybe you need one to just store the VERSION?)
>
True, we do not need a header.
> I didnt understand the point to the err field you had in the reply.
> Netlink already does issue errors which can be read via perror. If this
> is different from what you need, it may be an excuse to have your own
> header.
>
Hmm.. Will look into this.
> I hope this helps.
>
Yes, it does immensely. Thanks for the detailed feedback.
> cheers,
> jamal
>
>
Warm Regards,
Balbir
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
next prev parent reply other threads:[~2006-03-10 16:39 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 7:56 [Patch 0/7] Per-task delay accounting Shailabh Nagar
2006-02-27 8:02 ` [Patch 1/7] timespec diff utility Shailabh Nagar
2006-02-27 8:12 ` [Patch 2/7] Add sysctl for schedstats Shailabh Nagar
2006-02-27 8:52 ` Ingo Molnar
2006-02-27 10:46 ` [Lse-tech] " Balbir Singh
2006-02-27 12:18 ` Arjan van de Ven
2006-02-27 12:29 ` Balbir Singh
2006-02-27 13:06 ` Arjan van de Ven
2006-02-27 16:16 ` Balbir Singh
2006-02-27 9:17 ` Nick Piggin
2006-02-27 9:41 ` Shailabh Nagar
2006-02-27 12:28 ` Nick Piggin
2006-02-27 19:09 ` [Lse-tech] " Chandra Seetharaman
2006-02-28 0:25 ` Nick Piggin
2006-02-28 1:42 ` chandra seetharaman
2006-03-07 17:26 ` schedstats refinement (was Re: [Lse-tech] Re: [Patch 2/7] Add sysctl for schedstats) Balbir Singh
2006-02-27 17:05 ` [Lse-tech] [Patch 2/7] Add sysctl for schedstats Bryan O'Sullivan
2006-02-27 20:55 ` Shailabh Nagar
2006-02-27 22:26 ` Bryan O'Sullivan
2006-02-27 8:22 ` [Patch 1/7] timespec diff utility Arjan van de Ven
2006-02-27 8:34 ` Shailabh Nagar
2006-02-27 8:37 ` Arjan van de Ven
2006-02-27 8:15 ` [Patch 3/7] delay accounting initial setup Shailabh Nagar
2006-02-27 8:18 ` [Patch 4/7] Add sysctl for delay accounting Shailabh Nagar
2006-02-27 8:26 ` Arjan van de Ven
2006-02-27 8:38 ` Shailabh Nagar
2006-02-27 8:42 ` Arjan van de Ven
2006-02-27 8:59 ` Shailabh Nagar
2006-02-27 11:18 ` [Lse-tech] " Balbir Singh
2006-02-27 9:04 ` Dipankar Sarma
2006-02-27 9:13 ` Arjan van de Ven
2006-02-27 10:11 ` [Lse-tech] " Balbir Singh
2006-02-27 11:24 ` Arjan van de Ven
2006-02-27 12:00 ` Balbir Singh
2006-02-27 12:23 ` Srivatsa Vaddagiri
2006-02-27 8:20 ` [Patch 5/7] synchronous block I/O delays Shailabh Nagar
2006-02-27 8:29 ` Arjan van de Ven
2006-02-27 9:13 ` Shailabh Nagar
2006-02-27 9:18 ` Arjan van de Ven
2006-02-27 9:24 ` Arjan van de Ven
2006-02-27 14:18 ` Andi Kleen
2006-02-27 21:31 ` Shailabh Nagar
2006-02-27 22:09 ` Shailabh Nagar
2006-02-27 22:20 ` Andi Kleen
2006-02-28 8:10 ` Arjan van de Ven
2006-02-27 8:22 ` [Patch 6/7] Swapin page fault delays Shailabh Nagar
2006-02-27 8:30 ` Arjan van de Ven
2006-02-27 22:16 ` Shailabh Nagar
2006-02-27 8:31 ` [Patch 7/7] Generic netlink interface (delay accounting) Shailabh Nagar
[not found] ` <1141045194.5363.12.camel@localhost.localdomain>
[not found] ` <4403608E.1050304@watson.ibm.com>
[not found] ` <1141652556.5185.64.camel@localhost.localdomain>
2006-03-06 17:00 ` Shailabh Nagar
2006-03-07 14:38 ` [Lse-tech] " jamal
2006-03-08 21:56 ` Shailabh Nagar
2006-03-08 21:56 ` Shailabh Nagar
2006-03-09 14:37 ` [UPDATED PATCH] Re: [Lse-tech] " Balbir Singh
2006-03-09 14:37 ` [UPDATED PATCH] " Balbir Singh
2006-03-09 16:06 ` [UPDATED PATCH] Re: [Lse-tech] " Shailabh Nagar
2006-03-09 16:06 ` [UPDATED PATCH] " Shailabh Nagar
2006-03-10 14:53 ` [UPDATED PATCH] Re: [Lse-tech] " jamal
2006-03-10 14:53 ` [UPDATED PATCH] " jamal
2006-03-10 15:35 ` [UPDATED PATCH] Re: [Lse-tech] " jamal
2006-03-10 16:39 ` Balbir Singh [this message]
2006-03-10 16:39 ` [UPDATED PATCH] " Balbir Singh
2006-03-11 13:30 ` [UPDATED PATCH] Re: [Lse-tech] " jamal
2006-03-11 13:30 ` [UPDATED PATCH] " jamal
2006-03-13 16:21 ` [UPDATED PATCH] Re: [Lse-tech] " Balbir Singh
2006-02-27 9:10 ` [Patch 0/7] Per-task delay accounting Nick Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060310163927.GA6537@in.ibm.com \
--to=balbir@in.ibm.com \
--cc=hadi@cyberus.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=nagar@watson.ibm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.