On May 28, 2014, at 9:54, John Baldwin <jhb_at_freebsd.org> wrote: > Yes, I actually started by sorting on the raw delta and ended up going back and fixing > pctcpu instead. However, there is a problem in this case which is that you > still want to fall back to ki_pctcpu if you don't have a valid previous delta > to compare against. It's a lot simpler to just fixup ki_pctcpu and not have to go > change the sorting code explicitly. :( I actually started out having a function that > returned a double for the pctcpu, but that would mean recalculating the raw pctcpu > many, many times during the sort. Just updating ki_pctcpu once per each process/thread > per fetch scales a bit better. I could perhaps use an array to cache raw percentages > as doubles. > > Ok, try people.freebsd.org/~jhb/patches/top_pctcpu2.patch > Hey, all the 0.00% processes on my server now show up in top with measurable usage. Nice. (They're all between 0.3% and 0.9%)Received on Fri May 30 2014 - 15:32:38 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:49 UTC