Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Dec 2004 11:01:29 -0800
From:      Sean McNeil <sean@mcneil.com>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: mbuf count negative
Message-ID:  <1102273289.81612.1.camel@server.mcneil.com>
In-Reply-To: <Pine.NEB.3.96L.1041205184832.33974F-100000@fledge.watson.org>
References:  <Pine.NEB.3.96L.1041205184832.33974F-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1102273289.81612.1.camel>