Re: [PATCH] Export per-thread resource usage via sysctl

From: Pan Tsu <inyaoo_at_gmail.com>
Date: Sat, 16 Jul 2011 15:16:20 +0400
Alexander Best <arundel_at_freebsd.org> writes:

> On Fri Jul 15 11, John Baldwin wrote:
>> This change exports each individual thread's resource usage via sysctl when 
>> individual threads are requested via KERN_PROC_INC_THREAD.  This generally 
>> works correctly with 'top -m io' after the previous change to revert top(1) 
>> back to using KERN_PROC_PROC when threads are not enabled.  There is one issue 
>> in that top doesn't necessarily DTRT when disabling/enabling threads via 'H' 
>> at runtime while in io mode.  I may do some further work to clean that up.  
>> However, for just top run it will now show per-thread stats instead of 
>> duplicating the per-process stats for each thread.
>
> i'm not sure, if i understand what the patch is supposed to do. however after
> applying it, and recompiling/reinstalling the kernel, 'top -mio' displays the
> same stats for each thread of a process. if i understood you correctly, each
> thread should have individual stats.
>
> i'm running r224068 on amd64 and just reinstalled 'top'. anything i am missing?

FWIW, I see different numbers for a few threads of firefox-bin with top-3.8b1.

  http://img233.imageshack.us/img233/1570/81482202.png

Which is an improvement compared to how all threads showed same numbers
before applying the patch.
Received on Sat Jul 16 2011 - 09:42:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:15 UTC