From owner-freebsd-hackers Tue Jan 30 15:22: 2 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id E460437B6D4 for ; Tue, 30 Jan 2001 15:21:45 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id f0UNLcB95520; Tue, 30 Jan 2001 15:21:38 -0800 (PST) (envelope-from dillon) Date: Tue, 30 Jan 2001 15:21:38 -0800 (PST) From: Matt Dillon Message-Id: <200101302321.f0UNLcB95520@earth.backplane.com> To: Thomas Moestl Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: removing setgid kmem from top, collecting per-device swap stats References: <20010130224759.A1589@crow.dom2ip.de> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :vm.swapdev1.total (this is the one that is currently hard to get) You can't move swapinfo into the kernel as a sysctl unless you solve this problem. Traversing the radix tree is expensive enough that the entire system will stall for a short period of time if you run the loop in the kernel. The issue here is that swapinfo tries to break the useage down by swap area, whereas the kernel has no real concept of swap areas in the allocation map -- it just sees one big contiguous allocation map. So the kernel does not track allocations on a per-swap-area basis. This is why 'swapinfo' (aka pstat -s) takes so long to run. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message