From: Nikanth Karthikesan <knikanth@suse.de>
To: Guillaume Chazarain <guichaz@gmail.com>
Cc: balbir@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
procps-feedback@lists.sf.net,
Albert Cahalan <albert@users.sf.net>
Subject: Re: [PATCH 1/3] taskstats-fork: Add a new taskstats command to get notification on fork/clone
Date: Mon, 31 Aug 2009 14:41:28 +0530 [thread overview]
Message-ID: <200908311441.28354.knikanth@suse.de> (raw)
In-Reply-To: <3d8471ca0908301252j15cb33b1j913921bd8fc6704c@mail.gmail.com>
On Monday 31 August 2009 01:22:22 Guillaume Chazarain wrote:
> On Tue, Jul 21, 2009 at 8:24 AM, Nikanth Karthikesan<knikanth@suse.de>
wrote:
> > Ah.. proc-events was the exact thing, I was looking for! Thanks.
>
> AFAICT proc-events can only be used by root, so that makes it
> unsuitable for *top.
>
> Anyway, iotop will always have to iterate over all threads to query
> their taskstats and other attributes, so the O(nr_threads) complexity
> is unavoidable.
>
If it would simply iterate over all the current threads, the complexity would
be O(nr_threads). But while iterating through all the current threads, it
checks whether it is a new thread or a known thread, so that it can calculate
the delta values. This is what I optimized by using taskstats-fork, which
could be optimized using proc-events.
Thanks
Nikanth
prev parent reply other threads:[~2009-08-31 9:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 5:01 [PATCH 1/3] taskstats-fork: Add a new taskstats command to get notification on fork/clone Nikanth Karthikesan
2009-07-21 6:01 ` Balbir Singh
2009-07-21 6:24 ` Nikanth Karthikesan
2009-08-30 19:52 ` Guillaume Chazarain
2009-08-31 5:26 ` Balbir Singh
2009-08-31 9:11 ` Nikanth Karthikesan [this message]
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=200908311441.28354.knikanth@suse.de \
--to=knikanth@suse.de \
--cc=albert@users.sf.net \
--cc=balbir@linux.vnet.ibm.com \
--cc=guichaz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=procps-feedback@lists.sf.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox