Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2014 17:32:16 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        "Poul-Henning Kamp" <phk@phk.freebsd.dk>
Cc:        "current@freebsd.org" <current@freebsd.org>
Subject:   Re: Change top's notion of idle processes / threads
Message-ID:  <201405231732.16403.jhb@freebsd.org>
In-Reply-To: <9764.1400877579@critter.freebsd.dk>
References:  <201405231605.26312.jhb@freebsd.org> <9764.1400877579@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, May 23, 2014 4:39:39 pm Poul-Henning Kamp wrote:
> In message <201405231605.26312.jhb@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405231732.16403.jhb>