Please review: atomic updates to mbuf's external refcount
Gleb Smirnoff
glebius at FreeBSD.org
Wed Sep 11 14:54:22 UTC 2013
On Thu, Aug 29, 2013 at 12:57:06PM -0700, Navdeep Parhar wrote:
N> I'd like to merge r254341 from user/np/cxl_tuning to head if there are
N> no objections. It eliminates a couple of iffy looking constructs in
N> uipc_mbuf.c
N>
N> http://svnweb.freebsd.org/base/user/np/cxl_tuning/sys/kern/uipc_mbuf.c?r1=254334&r2=254341&diff_format=u
N>
N> ---------------------
N> Always increment or decrement an mbuf's external refcount atomically.
N> Always decrement it in mb_free_ext() so that an external free routine
N> can safely assert the refcount is 0 (and not 0 or 1) when it's called.
N> ---------------------
I'd like to second on this patch.
The "iffy looking constructs" do not work if we break assumption that
the mbuf is the only way to find a refcount for an external storage.
--
Totus tuus, Glebius.
More information about the freebsd-net
mailing list