From owner-freebsd-current@FreeBSD.ORG Sun Dec 5 18:53:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74F4616A4CE for ; Sun, 5 Dec 2004 18:53:39 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCE2C43D2D for ; Sun, 5 Dec 2004 18:53:38 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id iB5IpFN5045995; Sun, 5 Dec 2004 13:51:15 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)iB5IpFnB045991; Sun, 5 Dec 2004 18:51:15 GMT (envelope-from robert@fledge.watson.org) Date: Sun, 5 Dec 2004 18:51:15 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Barney Wolff In-Reply-To: <20041205170808.GA96727@pit.databus.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: mbuf count negative X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2004 18:53:39 -0000 On Sun, 5 Dec 2004, Barney Wolff wrote: > Is anybody else seeing this? Currently, the mbuf counters in the mbuf allocator are subject to races. I have a somewhat dated patch at: http://www.watson.org/~robert/freebsd/netperf/20040910-atomic-mballoc.diff It replaces non-atomic maintenance of the counters with atomic maintenance. However, this adds measurably to the cost of allocation, so I've been reluctant to commit it. The counters maintained by UMA are likely sufficient to generate the desired mbuf output now that we have mbuma, but I haven't had an opportunity to walk through the details of it. I hope to do so once I get closer to merging patches to use critical sections to protect UMA per-cpu caches, since I need to redo parts of the sysctl code then anyway. You might want to give this patch, or one much like it, a spin to confirm that the race is the one I think it is. The race in updating mbuf allocator statistics is one I hope to get fixed prior to 5.4. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research > > lab:/root # netstat -m > 4294959731 mbufs in use > 1170/25600 mbuf clusters in use (current/max) > 0/3/6656 sfbufs in use (current/peak/max) > 448 KBytes allocated to network > 0 requests for sfbufs denied > 0 requests for sfbufs delayed > 0 requests for I/O initiated by sendfile > 650 calls to protocol drain routines > lab:/root # uname -a > FreeBSD lab.databus.com 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Fri Dec 3 21:44:57 EST 2004 toor@lab.databus.com:/usr/obj/usr/src/sys/LAB i386 > > It happens almost instantly during periodic when the system is used to > receive a backup via nfs. Normal operation, including a dozen hours of > port building, does not cause it. It is consistent, 3 times now. > > H/W is Asus A7M266-D with 2xAthlon 2200MP, 1GB, 39160, gvinum, em. > > Problem did not occur with prior -current from 11/19/04. Other than cvsup, > I changed make.conf to say CPUTYPE=athlon-mp (was i686 or nothing). > > What can I do to help debug this? > > -- > Barney Wolff http://www.databus.com/bwresume.pdf > I'm available by contract or FT, in the NYC metro area or via the 'Net. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >