From owner-freebsd-current@FreeBSD.ORG Fri May 27 16:02:06 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 185201065672 for ; Fri, 27 May 2011 16:02:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E24278FC18 for ; Fri, 27 May 2011 16:02:05 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 7B0FF46B46; Fri, 27 May 2011 12:02:05 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 01B758A04F; Fri, 27 May 2011 12:02:05 -0400 (EDT) From: John Baldwin To: Sergey Kandaurov Date: Fri, 27 May 2011 11:59:28 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201105271046.30379.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105271159.28604.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 27 May 2011 12:02:05 -0400 (EDT) Cc: current@freebsd.org Subject: Re: [PATCH] Toggle display of the kernel idle process (per-CPU idle threads) in top X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 27 May 2011 16:02:06 -0000 On Friday, May 27, 2011 11:17:58 am Sergey Kandaurov wrote: > On 27 May 2011 18:46, John Baldwin wrote: > > Some times in top, I don't want to see all the per-CPU idle threads but > > instead focus on the non-idle threads that are running. Especially on a > > system with a lot of CPUs, the idle threads can push all the interesting > > threads off of the list. This patch adds a new 'z' flag (gratuitously chosen > > letter) and interactive command to toggle the display of the system idle > > process. Patch is tested against 8, but should work fine on HEAD too: > > Works on HEAD as well. I like this idea. > Perhaps it could be combined with i key? I couldn't think of a sane way. There are a few times when I want to see the idle processes, but mostly I don't want to see them and want all the other settings (idle, system, threads, etc.) to be orthogonal. I'd even be up for defaulting kdile to No so we don't show the idle threads by default. That would match the behavior of 4.x where there were no idle threads. > > @@ -1075,7 +1081,13 @@ > > reset_display(); > > putchar('\r'); > > break; > > - > > + case CMD_kidletog: > > + ps.kidle = !ps.kidle; > > + new_message(MT_standout | MT_delayed, > > + " %sisplaying kernel idle process.", > > > + ps.idle ? "D" : "Not d"); > ^^ > typo: s/idle/kidle/ Oops, thanks! -- John Baldwin