From owner-cvs-src@FreeBSD.ORG Wed Jul 20 09:17:43 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 126F516A422; Wed, 20 Jul 2005 09:17:43 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F6F843D49; Wed, 20 Jul 2005 09:17:42 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6K9HgDS049940; Wed, 20 Jul 2005 09:17:42 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6K9Hfun049913; Wed, 20 Jul 2005 09:17:41 GMT (envelope-from rwatson) Message-Id: <200507200917.j6K9Hfun049913@repoman.freebsd.org> From: Robert Watson Date: Wed, 20 Jul 2005 09:17:40 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libmemstat libmemstat.3 memstat.c memstat.h memstat_internal.h memstat_uma.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 09:17:43 -0000 rwatson 2005-07-20 09:17:40 UTC FreeBSD src repository Modified files: lib/libmemstat libmemstat.3 memstat.c memstat.h memstat_internal.h memstat_uma.c Log: UMA supports "secondary" zones, in which a second zone can be layered on top of a primary zone, sharing the same allocation "keg". When reporting statistics for zones, do not report the free items in the keg as part of the free items in the zone, or those free items will be reported more than once: for the primary zone, and then any secondary zones off the primary zone. Separately record and maintain a kegfree statistic, and export via memstat_get_kegfree(), which is available for use if needed. Since items free'd back to the keg are not fully initialized, and hence may not actually be available (since secondary zone ctor-time initialization can fail), this makes some amount of sense. This change corrects a bug made visible in the libmemstat(3) modifications to netstat: mbufs freed back to the keg from the packet zone would be counted twice, resulting in negative values being printed in the mbuf free count. Some further refinement of reporting relating to secondary zones may still be required. Reported by: ssouhlal MFC after: 3 days Revision Changes Path 1.4 +2 -0 src/lib/libmemstat/libmemstat.3 1.2 +8 -0 src/lib/libmemstat/memstat.c 1.5 +1 -0 src/lib/libmemstat/memstat.h 1.3 +1 -0 src/lib/libmemstat/memstat_internal.h 1.5 +2 -1 src/lib/libmemstat/memstat_uma.c