From owner-cvs-ports Wed Feb 21 03:03:18 1996 Return-Path: owner-cvs-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id DAA25890 for cvs-ports-outgoing; Wed, 21 Feb 1996 03:03:18 -0800 (PST) Received: from jhome.DIALix.COM (root@jhome.DIALix.COM [192.203.228.69]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id DAA25881 Wed, 21 Feb 1996 03:02:59 -0800 (PST) Received: from localhost.DIALix.oz.au (peter@localhost.DIALix.oz.au [127.0.0.1]) by jhome.DIALix.COM (8.7.3/8.7.3) with SMTP id TAA13555; Wed, 21 Feb 1996 19:02:45 +0800 (WST) Message-Id: <199602211102.TAA13555@jhome.DIALix.COM> X-Authentication-Warning: jhome.DIALix.COM: Host peter@localhost.DIALix.oz.au [127.0.0.1] didn't use HELO protocol To: davidg@Root.COM cc: Wolfram Schneider , CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-ports@freefall.freebsd.org Subject: Re: cvs commit: ports/sysutils/top/files m_freebsd2.c In-reply-to: Your message of "Tue, 20 Feb 1996 15:58:10 PST." <199602202358.PAA04476@Root.COM> Date: Wed, 21 Feb 1996 19:02:45 +0800 From: Peter Wemm Sender: owner-cvs-ports@FreeBSD.ORG Precedence: bulk >>wosch 96/02/20 15:50:15 >> >> Modified: sysutils/top/files m_freebsd2.c >> Log: >> make top smarter if cannot read swap addresses >> - always return if kvm_read() failed >> - stop calculating swap usage after 10 errors > > Why after 10? If it fails once, it should continue to fail. > >-DG It can fail transiently, because it's walking a kernel linked list. HOWEVER.. for some reason after John's most recent VM patches, once you have heavily swapped, the list walks right off the end of the address space that top/pstat/swapinfo can reach via /dev/kmem. ie: reading the "next" pointer gets an EFAULT from read().. Once this happens, it happens until the next reboot. Perhaps the swapinfo derived code is doing it wrong.. Or perhaps the code is walking a list that is no longer reliably maintained. Perhaps the swapinfo code needs to get the swaplist via sysctl(3). Cheers, -Peter