From owner-freebsd-fs@FreeBSD.ORG Mon Jul 2 15:04:37 2012 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1D8106566C for ; Mon, 2 Jul 2012 15:04:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 23D4B8FC19 for ; Mon, 2 Jul 2012 15:04:37 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 80BE8B96D; Mon, 2 Jul 2012 11:04:36 -0400 (EDT) From: John Baldwin To: Markus Gebert Date: Mon, 2 Jul 2012 10:50:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201206251443.41768.jhb@freebsd.org> <0EF22D00-1CDB-44DA-BF3C-3AC672072C05@hostpoint.ch> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201207021050.13974.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 02 Jul 2012 11:04:36 -0400 (EDT) Cc: fs@freebsd.org Subject: Re: [PATCH] Simple ARC stats in top X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 15:04:37 -0000 On Monday, July 02, 2012 8:12:26 am Markus Gebert wrote: > Hi John > > On 27.06.2012, at 17:49, Markus Gebert wrote: > > > On 27.06.2012, at 14:10, John Baldwin wrote: > > > >> Hmmm, my patch is relative to a top that has -P backported and I can't > >> reproduce this, the ARC lines moves around properly if 'P' is toggled > >> at runtime as well for me. Did you have any conflicts in your patch > >> that you had to resolve by hand? > > > > No, I did not merge anything by hand. But what I did, and that probably was the cause, is only buildworld with NO_CLEAN=1 to save time and just rebuild top. Now that I've done a full buildworld, the probem seems to be gone. I'll test more and step up, if it happens again, but consider this solved for now. Sorry for the noise. > > The problem is back. I don't know why I thought it was gone last week, maybe I looked at the wrong terminal or something. > > Anyway, I tried again today, and I can reproduce this not only on 8.3 but also on 9.0. To rule out a problem with iTerm I also tried OS X Terminal and Gnome Terminal on Ubuntu. The terminal does not seem to matter at all. > > This sample output is from a patched top (run with -S -P) on a 9.0 server connected to via ssh: I found it. I wasn't updating y_arc for PCPU stats. Try this: Index: usr.bin/top/machine.c =================================================================== --- machine.c (revision 225593) +++ machine.c (working copy) @@ -263,6 +263,7 @@ update_layout(void) { y_mem = 3; + y_arc = 4; y_swap = 4 + arc_enabled; y_idlecursor = 5 + arc_enabled; y_message = 5 + arc_enabled; @@ -271,7 +272,8 @@ update_layout(void) Header_lines = 7 + arc_enabled; if (pcpu_stats) { - y_mem = ncpus - 1; + y_mem += ncpus - 1; + y_arc += ncpus - 1; y_swap += ncpus - 1; y_idlecursor += ncpus - 1; y_message += ncpus - 1; -- John Baldwin