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?
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:23 UTC