lkml.org 
[lkml]   [2009]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] taskstats-fork: Add a new taskstats command to get notification on fork/clone
Date
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


\
 
 \ /
  Last update: 2009-08-31 11:11    [W:0.033 / U:6.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site