Change top's notion of idle processes / threads
John Baldwin
jhb at freebsd.org
Fri May 23 21:34:12 UTC 2014
On Friday, May 23, 2014 4:39:39 pm Poul-Henning Kamp wrote:
> In message <201405231605.26312.jhb at freebsd.org>, John Baldwin writes:
>
> >In essence, top will consider any thread that has run on a CPU
> >since the last update as non-idle.
>
> Sounds a lot more usable than the current heuristic.
>
> Wouldn't ki_rusage.ru_n[i]vcsw be more correct than ki_runtime ?
Hmmm, possibly. ki_runtime in the kernel is basically TSC counts and gets
updated on each context switch. OTOH, I think the exported version only has
microsecond granularity which is probably too small. :( I can try your
suggestion.
--
John Baldwin
More information about the freebsd-current
mailing list