On Sat Jul 16 11, Pan Tsu wrote:
> Alexander Best <arun...@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.

hmmm...not here. i did the following: 'top -mio -b -H -d2 999999' and had a
look at the second output, where if found these lines:

[...]
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
 2015   1001       61      8      0      0      1      1   3.70% 
chromium-browser:  (chrome)
[...]
 2068   1001      383    137      0      0      0      0   0.00% 
/usr/local/jdk1.6.0/bin/java -Xmx512m -jar JDownloader.jar
 2068   1001      383    137      0      0      0      0   0.00% 
/usr/local/jdk1.6.0/bin/java -Xmx512m -jar JDownloader.jar
[...]

the first output seems to behave similar:

[...]
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
 1881      0      656     68     15      0     41     56   0.00% 
/usr/local/sbin/console-kit-daemon --no-daemon
[...]

cheers.
alex
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to