[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200908311441.28354.knikanth@suse.de>
Date: Mon, 31 Aug 2009 14:41:28 +0530
From: Nikanth Karthikesan <knikanth@...e.de>
To: Guillaume Chazarain <guichaz@...il.com>
Cc: balbir@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
procps-feedback@...ts.sf.net, Albert Cahalan <albert@...rs.sf.net>
Subject: Re: [PATCH 1/3] taskstats-fork: Add a new taskstats command to get notification on fork/clone
On Monday 31 August 2009 01:22:22 Guillaume Chazarain wrote:
> On Tue, Jul 21, 2009 at 8:24 AM, Nikanth Karthikesan<knikanth@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists