Date: Fri, 23 May 2014 17:22:39 -0400 From: Allan Jude <allanjude@freebsd.org> To: freebsd-current@freebsd.org Subject: Re: Change top's notion of idle processes / threads Message-ID: <537FBC1F.6030408@freebsd.org> 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
[-- Attachment #1 --] On 2014-05-23 16: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 this makes good sense. I would definitely prefer it. Would it make sense to maybe preserve the old behaviour behind a command line flag? -- Allan Jude [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?537FBC1F.6030408>
