From owner-freebsd-current@FreeBSD.ORG Sun Dec 5 19:01: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 2D8AB16A4CE; Sun, 5 Dec 2004 19:01:39 +0000 (GMT) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB82943D55; Sun, 5 Dec 2004 19:01:38 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id 79670F216C; Sun, 5 Dec 2004 11:01:38 -0800 (PST) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (server.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 71742-10; Sun, 5 Dec 2004 11:01:30 -0800 (PST) Received: from mcneil.com (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id 6976DF2148; Sun, 5 Dec 2004 11:01:30 -0800 (PST) From: Sean McNeil To: Robert Watson In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TiWKaKKSWh+L5RXbSe+H" Date: Sun, 05 Dec 2004 11:01:29 -0800 Message-Id: <1102273289.81612.1.camel@server.mcneil.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 FreeBSD GNOME Team Port X-Virus-Scanned: by amavisd-new at mcneil.com cc: Barney Wolff 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 19:01:39 -0000 --=-TiWKaKKSWh+L5RXbSe+H Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2004-12-05 at 18:51 +0000, Robert Watson wrote: > On Sun, 5 Dec 2004, Barney Wolff wrote: >=20 > > Is anybody else seeing this? >=20 > Currently, the mbuf counters in the mbuf allocator are subject to races. > I have a somewhat dated patch at: >=20 > http://www.watson.org/~robert/freebsd/netperf/20040910-atomic-mballoc= .diff >=20 > 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= .=20 > 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. Since they appear to not be required for actual system use (by the fact that it being negative doesn't cause problems), could the counts be computed for display instead? --=-TiWKaKKSWh+L5RXbSe+H Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBs1sJyQsGN30uGE4RAqFsAJ9GhLFbygSb4DlwyZkiQbkcLX8nNwCglNM4 6wozPnmIZQ1QMnrlgOVQXr8= =F6eC -----END PGP SIGNATURE----- --=-TiWKaKKSWh+L5RXbSe+H--