From owner-cvs-all@FreeBSD.ORG Tue Nov 7 10:03:11 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77F6416A403; Tue, 7 Nov 2006 10:03:11 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44B0243D5D; Tue, 7 Nov 2006 10:03:11 +0000 (GMT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kA7A3Bbb005183; Tue, 7 Nov 2006 10:03:11 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kA7A3B3x005182; Tue, 7 Nov 2006 10:03:11 GMT (envelope-from bde) Message-Id: <200611071003.kA7A3B3x005182@repoman.freebsd.org> From: Bruce Evans Date: Tue, 7 Nov 2006 10:03:11 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.bin/top machine.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2006 10:03:11 -0000 bde 2006-11-07 10:03:11 UTC FreeBSD src repository Modified files: usr.bin/top machine.c Log: Second stage of unbreaking thr formatting of the NICE field: decode the priority class and use this to: - print "-" instead of a garbage value for ithreads. Print "-" instead of the unused nice value for kthreads which are (mis)classified as PRI_TIMESHARE. For such threads, the nice value can be set to nonzero by root, but it is never used (at least by the 4bsd scheduler). For ithreads, we didn't even print the unused value. - print "i" and "r" instead of a biased "" for idletime and realtime threads, Here is the priority parameter to idprio/rtprio(1). Just add the prefix and remove the bias for now. has been stored indirectly in the kernel since 2001/02/12, and even the kernel cannot recover the original value in all cases. Here we need to handle more cases than pri_to_rtp(), but actually handle fewer cases, and end up printing garbage after a thread changes its current priority while in the kernel. - for idletime and realtime threads, if they are kthreads then add a prefix of "k" to the previous string. - for idletime and realtime threads, if they in the FIFO scheduling class then add a suffix of "F" to the previous string (if it fits; the other parts of the string are sure to fit unless is garbage). Revision Changes Path 1.78 +29 -15 src/usr.bin/top/machine.c