Date: Tue, 10 Jun 2008 12:51:43 +0200 (CEST) From: "Walter C. Pelissero" <walter.pelissero@iesy.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/124441: wmmemfree doesn't report swap changes Message-ID: <200806101051.m5AAphJu018480@zaphod.home.loc> Resent-Message-ID: <200806101100.m5AB05As038196@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806101051.m5AAphJu018480>