From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 8 18:53:45 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA177106566B; Tue, 8 Feb 2011 18:53:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C2FEE8FC14; Tue, 8 Feb 2011 18:53:45 +0000 (UTC) Received: from [10.255.241.24] (192-5-67-11.sri.com [192.5.67.11]) by cyrus.watson.org (Postfix) with ESMTPSA id 1BFD046B09; Tue, 8 Feb 2011 13:53:45 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <4D518D82.4090102@rice.edu> Date: Tue, 8 Feb 2011 10:53:44 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <709DC06E-11E8-4B92-8623-0EB8C835B28B@FreeBSD.org> References: <4D518D82.4090102@rice.edu> To: Alan Cox X-Mailer: Apple Mail (2.1082) Cc: alc@freebsd.org, freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: Analyzing wired memory? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2011 18:53:46 -0000 On 8 Feb 2011, at 10:37, Alan Cox wrote: >> John and I have occasionally talked about making procstat -v work on = the kernel; conceivably it could also export a wired page count for = mappings where it makes sense. Ideally procstat would drill in a bit = and allow you to see things at least at the granularty of "this page = range was allocated to UMA". >=20 > I would certainly have found this useful on a few occasions, and would = gladly help out with implementing it. For example, it would help us in = understanding the kmem_map fragmentation caused by ZFS. That said, I'm = not sure how you will represent the case where UMA allocates physical = memory directly and uses the direct map to access it. I agree -- in some sense, my proposal is related to, but somewhat = orthogonal to, the problem Ivan is running into. We could also have a more detailed but UMA-specific inspection tool; I = have a uma dumping tool in src/tools somewhere that dumps zone = information, buckets, etc, for UMA types. I've used this in the past to = explore mbuf alloc/free behaviour, multi-CPU imbalances in allocation, = over-caching, etc. It may be time to revisit that, decide how to make it = a bit more user/developer-friendly, and make it a formally supported = tool as part of vmstat (which involves adding some new sysctls as well). Robert