Please review: atomic updates to mbuf's external refcount
Navdeep Parhar
np at FreeBSD.org
Wed Sep 11 17:00:32 UTC 2013
On 09/11/13 07:54, Gleb Smirnoff wrote:
> 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.
>
ok, I'll ask re@ to approve this for head.
Regards,
Navdeep
More information about the freebsd-net
mailing list