All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shailabh Nagar <nagar@watson.ibm.com>
To: Peter Chubb <peterc@gelato.unsw.edu.au>
Cc: Andrew Morton <akpm@osdl.org>,
	balbir@in.ibm.com, greg@kroah.com, arjan@infradead.org,
	hadi@cyberus.ca, ak@suse.de, linux-kernel@vger.kernel.org,
	lse-tech@lists.sourceforge.net
Subject: Re: [Patch 0/8] per-task delay accounting
Date: Fri, 31 Mar 2006 11:03:30 -0500	[thread overview]
Message-ID: <442D52D2.2050307@watson.ibm.com> (raw)
In-Reply-To: <17452.58762.293670.563445@wombat.chubb.wattle.id.au>

Peter Chubb wrote:

>>>>>>"Shailabh" == Shailabh Nagar <nagar@watson.ibm.com> writes:
>>>>>>            
>>>>>>
>
>Shailabh> Peter Chubb wrote:
> (microstate accounting patch)
>  
>
>>> It's still maintained in a sporadic sort of way --- I update it
>>>when either I need it for something, or someone's downloaded it and
>>>asks why it doesn't work agains kernel X.Y.Z.  I see a few
>>>downloads a month.
>>>
>>>
>>>      
>>>
>Shailabh> So do you intend to pursue acceptance ? If so, do you think
>Shailabh> the netlink-based taskstats interface provided by the delay
>Shailabh> accounting patches could be an acceptable substitute for the
>Shailabh> interfaces you had (from an old lkml post, they appear to be
>Shailabh> /proc/tgid/msa and a syscall based one) ?
> 
>I'd have to take a close look. 
>
Please do ! As I mentioned in the other note where I summarize the 
various accounting packages
I think it should be fairly easy for microstate accounting to extend the 
structure returned by the
taskstats interface.

> The syscall interface is modelled on
>getrusage(), and only lets you get your own or your children's data;
>I'm not too worried about trashing it, as it should be possible to
>emulate in terms of netlink (albeit at a cost; system calls are
>relatively cheap)
>
>/proc/<pid>/task/<tid>/msa lets you get at anything you own.  I use
>awk scripts to process the msa file in /proc/... and pipe it into
>gnuplot at n second intervals; a netlink interface would need to have
>an auxiliary program to read it and then squirt it into the scripts, I
>think --- or is there a way to get ASCII out on demand?  
>
No. The use of netlink pretty much means you have to use an auxiliary 
program. We provide
one already (as part of the documentation to the patches).

What netlink  buys you is the ability to
- get data for a task after it has exited  (ie netlink  serves as a buffer)
- get data for large number of tasks more efficiently than /proc


>I quite often
>use cat to do quick checks on whats going on too --- so overall I think
>the /proc interface is desirable.
>  
>
Yes, /proc is more convenient both for cat'ting and also since its  used 
by tools like top.
Delay accounting patches also provide the "block I/O wait (including 
swapin)" statistic through
/proc/tgid/stat for convenience and so that top etc. can use it while 
displaying per-task stats.


However, the question here is this:

*if* a single, unified interface for per-task statistics was deemed to 
be desirable (as Andrew is
effectively suggesting we explore),  what would that interface be ? 
/proc-based, netlink based  or syscall-based ?

I would submit it is netlink-based since it is a superset of /proc and 
syscalls.
Neither of the latter two can return data after a task has exited 
(atleast not easily...you can always invent
infrastructure to buffer per-task stats but it would be cumbersome)
Whereas the former can, with the help of an auxiliary program, provide 
the same data that /proc and syscalls can.
The price paid by /proc and syscall users for unification is 
convenience, not loss of functionality.

Would you agree ?

--Shailabh








  reply	other threads:[~2006-03-31 16:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30  0:32 [Patch 0/8] per-task delay accounting Shailabh Nagar
2006-03-30  0:35 ` [Patch 1/8] Setup Shailabh Nagar
2006-03-30  5:03   ` Andrew Morton
2006-03-30 15:07     ` Shailabh Nagar
2006-03-30  0:37 ` [Patch 2/8] Block I/O, swapin delays Shailabh Nagar
2006-03-30  5:03   ` Andrew Morton
2006-03-30 15:21     ` Shailabh Nagar
2006-03-30  0:42 ` [Patch 3/8] cpu delays Shailabh Nagar
2006-03-30  5:03   ` Andrew Morton
2006-03-30 16:01     ` Shailabh Nagar
2006-03-30 16:00   ` Dave Hansen
2006-03-30 16:03     ` Shailabh Nagar
2006-03-30  0:48 ` [Patch 4/8] generic netlink utility functions Shailabh Nagar
2006-03-30  0:52 ` [Patch 5/8] generic netlink interface for delay accounting Shailabh Nagar
2006-03-30  5:04   ` Andrew Morton
2006-03-30  6:10     ` Balbir Singh
2006-03-30  6:26       ` Andrew Morton
2006-03-30  6:29         ` Balbir Singh
2006-03-30 16:24       ` Shailabh Nagar
2006-03-30  0:54 ` [Patch 6/8] virtual cpu run time Shailabh Nagar
2006-03-30  5:04   ` Andrew Morton
2006-03-30 16:10     ` Shailabh Nagar
2006-03-30  0:56 ` [Patch 7/8] proc interface for block I/O delays Shailabh Nagar
2006-03-30  5:04   ` Andrew Morton
2006-03-30  0:59 ` [Patch 8/8] documentation, userspace utility Shailabh Nagar
2006-03-30  5:03 ` [Patch 0/8] per-task delay accounting Andrew Morton
2006-03-30  6:23   ` Balbir Singh
2006-03-30  6:47     ` Andrew Morton
2006-03-30  9:55       ` Paul Jackson
2006-03-30 13:23       ` [Lse-tech] " Dipankar Sarma
2006-03-30 17:23       ` Shailabh Nagar
2006-03-31  2:54         ` Peter Chubb
2006-03-31  5:27           ` Shailabh Nagar
2006-03-31  8:17             ` Peter Chubb
2006-03-31 16:03               ` Shailabh Nagar [this message]
     [not found]       ` <442CCF54.3000501@watson.ibm.com>
2006-03-31  7:31         ` Guillaume Thouvenin
2006-03-31 17:01           ` Shailabh Nagar
     [not found]         ` <442D8E39.8080606@engr.sgi.com>
     [not found]           ` <442DED81.5060009@engr.sgi.com>
2006-04-10 17:15             ` Jay Lan
2006-04-10 21:44               ` Shailabh Nagar
2006-04-10 22:33                 ` [Lse-tech] " Jay Lan
  -- strict thread matches above, loose matches on Subject: below --
2006-04-22  2:16 Shailabh Nagar
2006-04-25 15:07 ` Shailabh Nagar
2006-05-02  6:11 Balbir Singh

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=442D52D2.2050307@watson.ibm.com \
    --to=nagar@watson.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=balbir@in.ibm.com \
    --cc=greg@kroah.com \
    --cc=hadi@cyberus.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=peterc@gelato.unsw.edu.au \
    /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.