From owner-freebsd-current@FreeBSD.ORG Fri May 23 21:22:40 2014 Return-Path: Delivered-To: freebsd-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 D5C4077C for ; Fri, 23 May 2014 21:22:40 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id AF7FC2811 for ; Fri, 23 May 2014 21:22:39 +0000 (UTC) Received: from [10.1.1.1] (S01060001abad1dea.hm.shawcable.net [50.70.146.73]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id C640578DAE for ; Fri, 23 May 2014 21:22:38 +0000 (UTC) Message-ID: <537FBC1F.6030408@freebsd.org> Date: Fri, 23 May 2014 17:22:39 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: freebsd-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> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="utexwEdpck9h84cwI2rMqDsLSVklxaOSG" 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 21:22:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --utexwEdpck9h84cwI2rMqDsLSVklxaOSG Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-05-23 16:05, John Baldwin wrote: > Right now, when top is set to not display idle processes or threads, it= only=20 > displays processes or threads that are currently in a runnable state or= have a=20 > non-zero %cpu. However, our %cpu is quite imprecise. I have patch to = change=20 > top to instead compare the thread or processes runtime (ki_runtime in=20 > kinfo_proc) against the runtime of the thread or process the last time = data=20 > was fetched. In essence, top will consider any thread that has run on = a CPU=20 > since the last update as non-idle. The end result is that mostly-idle = threads=20 > and processes will now be visible in top's idle display. Personally, I= find=20 > this more useful (and find the current implementation completely useles= s). =20 > The patch is at http://people.freebsd.org/~jhb/patches/top_idle.patch >=20 > Comments? >=20 I think this makes good sense. I would definitely prefer it. Would it make sense to maybe preserve the old behaviour behind a command line flag= ? --=20 Allan Jude --utexwEdpck9h84cwI2rMqDsLSVklxaOSG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTf7wmAAoJEJrBFpNRJZKf/owP/2fL1Tb7IZ0oEqKCs3lUVqcF F9G1myIRL+rvPhAcFjCiaJFF9Zc3rNbqQqHcFbFpGmLwInrrkELkLczBgyY/l88y Lr1hzAYFZssG1BaTBb0kotaC+cwO0w7xT+p3SRkjlBaXn+E8QFe/LdneAaX5iqFn H3a91L5/SSj/ApWtouFD//36hRpKtYu/aHmIBsAx8KH1xafIDh/+M+QN0f8/WuIL +9wtWGcE71B4fxhnA03f3T30GtwI2bfCUcyyQlC+j1xWTLZb9IoMLtipKvkhG9cM UjaHyjSapdxcPv0hqRDgetexEEWVPIOV7AsE1yzEI5lynttku1EQ+1ZbsxQpyHWD G47J9RWeJkvOPkIo5MEaEVJqZWrJ6T6NqZ4u9xSi6OqQpyhZ2sRCB5w0cQdnAv67 nZ96W1Z4QOmTGIpsLMjt1mCggTdryBPqHTBjiZy1glpFQ4MbBeByl4OTQULzwuog hSNkqzJWeKtVket4DLscntNrCCnzI8/9u8R9FepoQgv+4DrZwSoHRnlH3iBtdS0U QGwLwwTf3Pc77dT2M9ECGtvXc5MNS8/R90wOaPmL8bN0XfeGkZ1vxU5MjFO13ErC Ug6g7asJyLkMq9Xp/9al8+Krwj+RtSLNQKxMcE5DIharz/uWUSLKNjWZna6MitsF gMl3N7zK5kg8B6r1po0w =lDrM -----END PGP SIGNATURE----- --utexwEdpck9h84cwI2rMqDsLSVklxaOSG--