Date: Wed, 11 Sep 2013 18:54:18 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Navdeep Parhar <np@FreeBSD.org> Cc: freebsd-net@FreeBSD.org Subject: Re: Please review: atomic updates to mbuf's external refcount Message-ID: <20130911145418.GN4574@FreeBSD.org> In-Reply-To: <521FA792.9000807@FreeBSD.org> References: <521FA792.9000807@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130911145418.GN4574>