Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2014 15:29:34 -0500
From:      Eric van Gyzen <eric@vangyzen.net>
To:        John Baldwin <jhb@freebsd.org>, "current@freebsd.org" <current@freebsd.org>
Subject:   Re: Change top's notion of idle processes / threads
Message-ID:  <537FAFAE.9090701@vangyzen.net>
In-Reply-To: <201405231605.26312.jhb@freebsd.org>
References:  <201405231605.26312.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/23/2014 15:05, John Baldwin wrote:
> Right now, when top is set to not display idle processes or threads, it only 
> displays processes or threads that are currently in a runnable state or have a 
> non-zero %cpu.  However, our %cpu is quite imprecise.  I have patch to change 
> top to instead compare the thread or processes runtime (ki_runtime in 
> kinfo_proc) against the runtime of the thread or process the last time data 
> was fetched.  In essence, top will consider any thread that has run on a CPU 
> since the last update as non-idle.  The end result is that mostly-idle threads 
> and processes will now be visible in top's idle display.  Personally, I find 
> this more useful (and find the current implementation completely useless).  
> The patch is at http://people.freebsd.org/~jhb/patches/top_idle.patch
>
> Comments?

I think I would much prefer the behavior with your patch.

Eric



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