From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jun 10 11:00:06 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7012F10656C3 for ; Tue, 10 Jun 2008 11:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 456C88FC3D for ; Tue, 10 Jun 2008 11:00:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m5AB05m2038197 for ; Tue, 10 Jun 2008 11:00:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m5AB05As038196; Tue, 10 Jun 2008 11:00:05 GMT (envelope-from gnats) Resent-Date: Tue, 10 Jun 2008 11:00:05 GMT Resent-Message-Id: <200806101100.m5AB05As038196@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, walter@pelissero.de Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B0C4106567C for ; Tue, 10 Jun 2008 10:52:37 +0000 (UTC) (envelope-from walter.pelissero@iesy.net) Received: from mail01.ish.de (wsmip250.ish.de [80.69.98.250]) by mx1.freebsd.org (Postfix) with ESMTP id EE7048FC18 for ; Tue, 10 Jun 2008 10:52:36 +0000 (UTC) (envelope-from walter.pelissero@iesy.net) Received: from [81.210.224.6] (account walter.pelissero@iesy.net HELO zaphod.home.loc) by mail-fe-03.mail01.ish.de (CommuniGate Pro SMTP 5.1.12) with ESMTPSA id 18412772 for FreeBSD-gnats-submit@freebsd.org; Tue, 10 Jun 2008 12:52:29 +0200 Received: from zaphod.home.loc (localhost [127.0.0.1]) by zaphod.home.loc (8.14.2/8.14.1) with ESMTP id m5AAphZx018482 for ; Tue, 10 Jun 2008 12:51:43 +0200 (CEST) (envelope-from wcp@zaphod.home.loc) Received: (from wcp@localhost) by zaphod.home.loc (8.14.2/8.13.3/Submit) id m5AAphJu018480; Tue, 10 Jun 2008 12:51:43 +0200 (CEST) (envelope-from wcp) Message-Id: <200806101051.m5AAphJu018480@zaphod.home.loc> Date: Tue, 10 Jun 2008 12:51:43 +0200 (CEST) From: "Walter C. Pelissero" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/124441: wmmemfree doesn't report swap changes X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: walter@pelissero.de List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2008 11:00:06 -0000 >Number: 124441 >Category: ports >Synopsis: wmmemfree doesn't report swap changes >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 10 11:00:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Walter C. Pelissero >Release: FreeBSD 7.0-STABLE i386 >Organization: >Environment: System: FreeBSD zaphod.home.loc 7.0-STABLE FreeBSD 7.0-STABLE #1: Sat May 31 19:48:11 CEST 2008 root@zaphod.home.loc:/usr/src/sys/i386/compile/TYAN-TIGER-MP i386 >Description: At least on FreeBSD 7.0 wmmemfree doesn't report the swap usage changes. Only the first figure is actually correct, but thereafter never again. >How-To-Repeat: Run wmmemfree. Run anything large that would require paging. Observe that the reported swap usage doesn't change. Ever. >Fix: As a workaround, the following patch gets rid of a test that is never true in mem_freebsd.c (included with the port) and gives more time between the updates due to the comment just above that test. --- /usr/ports/sysutils/wmmemfree/files/mem_freebsd.c 2005-03-14 17:59:06.000000000 +0100 +++ mem_freebsd.c 2008-06-10 12:34:17.000000000 +0200 @@ -105,10 +105,7 @@ curtime = time(NULL); - if (firsttime || - (((vm.v_swappgsin > pagesin) || - (vm.v_swappgsout > pagesout)) - && curtime > lasttime + 1)) + if (firsttime || (curtime > lasttime + 5)) { if (kvm_getswapinfo(kd, &sw, 1, 0) >= 0 && sw.ksw_total) I dont' believe this is the final solution to this problem. There is obviously something wrong about the test on v_swappgsin and v_swappgsout that I couldn't figure out in the ten minutes it took me to write this workaround. >Release-Note: >Audit-Trail: >Unformatted: