mbuf count negative

Sean McNeil sean at mcneil.com
Sun Dec 5 11:01:39 PST 2004


On Sun, 2004-12-05 at 18:51 +0000, Robert Watson wrote:
> 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.

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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20041205/23ca482e/attachment.bin


More information about the freebsd-current mailing list