From owner-cvs-all Sat Sep 29 18:58:48 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0EA5D37B401; Sat, 29 Sep 2001 18:58:40 -0700 (PDT) Received: (from bmilekic@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8U1wei65871; Sat, 29 Sep 2001 18:58:40 -0700 (PDT) (envelope-from bmilekic) Message-Id: <200109300158.f8U1wei65871@freefall.freebsd.org> From: Bosko Milekic Date: Sat, 29 Sep 2001 18:58:40 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern subr_mbuf.c src/sys/sys mbuf.h src/usr.bin/netstat mbuf.c src/usr.bin/systat mbufs.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG bmilekic 2001/09/29 18:58:39 PDT Modified files: sys/kern subr_mbuf.c sys/sys mbuf.h usr.bin/netstat mbuf.c usr.bin/systat mbufs.c Log: Re-enable mbtypes statistics in the mbuf allocator. I disabled these when I changed the allocator bits. This implements per-CPU mbtypes stats by keeping net number of decrements/increments of a given mbtype per-CPU and then summing all of the per-CPU mbtypes to produce the total net number of allocated mbufs of the given mbtype. Counters are carefully balanced to avoid/prevent underflows/overflows. mbtypes stats are re-enabled with the idea that we may occasionally (although very rarely) observe slight inconsistencies in the stat reporting. Most of the time, we should be fine, though. Also make appropriate modifications to netstat(1) and systat(1) to do the necessary reporting. Submitted by: Jiangyi Liu Revision Changes Path 1.9 +72 -14 src/sys/kern/subr_mbuf.c 1.85 +12 -7 src/sys/sys/mbuf.h 1.29 +32 -46 src/usr.bin/netstat/mbuf.c 1.15 +32 -33 src/usr.bin/systat/mbufs.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message