Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 1996 19:02:45 +0800
From:      Peter Wemm <peter@jhome.DIALix.COM>
To:        davidg@Root.COM
Cc:        Wolfram Schneider <wosch@freefall.freebsd.org>, 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 
Message-ID:  <199602211102.TAA13555@jhome.DIALix.COM>
In-Reply-To: Your message of "Tue, 20 Feb 1996 15:58:10 PST." <199602202358.PAA04476@Root.COM> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602211102.TAA13555>