Date: Thu, 1 May 2003 15:17:33 -0400 From: Bosko Milekic <bmilekic@unixdaemons.com> To: Luigi Rizzo <rizzo@icir.org> Cc: freebsd-net@freebsd.org Subject: Re: Review needed: Mbuf double-free detection patch Message-ID: <20030501191733.GA58454@unixdaemons.com> In-Reply-To: <20030501113639.B65552@xorpc.icir.org> References: <20030430142532.F3741@odysseus.silby.com> <20030501041210.A3514@xorpc.icir.org> <20030501170638.GA17758@unixdaemons.com> <20030501113639.B65552@xorpc.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 01, 2003 at 11:36:39AM -0700, Luigi Rizzo wrote: > On Thu, May 01, 2003 at 01:06:38PM -0400, Bosko Milekic wrote: > ... > > The reason it's done that way has to do with a bigger optimization > > than just the avoidance of the extra function call: the cache lock is > > held, as most as possible, across repeated calls to mb_free(). In > > order to implement this "as most as possible," to allow for virtually > > atomic frees in some cases, it was ripped out and done that way... if > > you can figure out a cleaner way, that would be cool, though. > > but according to the comment (and the code) that optimization > is not there yet because of issues in some of the functions > called in the body. Given that you have clearly documented what the > plan is and what the issues are, i would suggest to revert m_freem() > to use m_free() until those issues are solved. In addition to > reducing the code size, this would also reduce the risk that the > two pieces of code diverge by mistake. Well, I was going to actually complete the optimization for the cluster case (because cluster ref counts are no longer malloc'd), but now that there's a call to m_tag_destroy in the body, I don't know if it's possible at all. So what you're proposing makes sense. > cheers > luigi > > > -- > > Bosko Milekic > > bmilekic@unixdaemons.com > > bmilekic@FreeBSD.org -- Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030501191733.GA58454>