From owner-freebsd-current@FreeBSD.ORG Fri May 23 20:30:45 2014 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAD27459; Fri, 23 May 2014 20:30:45 +0000 (UTC) Received: from aussmtpmrkpc120.us.dell.com (aussmtpmrkpc120.us.dell.com [143.166.82.159]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "ausxipmktpc11.us.dell.com", Issuer "Dell Inc. Enterprise Issuing CA1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 951FE236F; Fri, 23 May 2014 20:30:44 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.98,896,1392184800"; d="scan'208";a="101552490" Message-ID: <537FAFAE.9090701@vangyzen.net> Date: Fri, 23 May 2014 15:29:34 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: John Baldwin , "current@freebsd.org" Subject: Re: Change top's notion of idle processes / threads References: <201405231605.26312.jhb@freebsd.org> In-Reply-To: <201405231605.26312.jhb@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 20:30:45 -0000 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