Date: Thu, 9 Feb 2006 01:29:57 -0800 (PST) From: Jeff Roberson <jroberson@chesapeake.net> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: Qing Li <qingli@FreeBSD.org>, jeff@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_syncache.c Message-ID: <20060209012914.Q571@10.0.0.1> In-Reply-To: <20060209091307.GY877@FreeBSD.org> References: <200602082332.k18NWwN2039341@repoman.freebsd.org> <20060209091307.GY877@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Feb 2006, Gleb Smirnoff wrote: > On Wed, Feb 08, 2006 at 11:32:58PM +0000, Qing Li wrote: > Q> qingli 2006-02-08 23:32:58 UTC > Q> > Q> FreeBSD src repository > Q> > Q> Modified files: > Q> sys/netinet tcp_syncache.c > Q> Log: > Q> Redo the previous fix by setting the UMA_ZONE_ZINIT bit in the syncache > Q> zone, eliminating the need to call bzero() after each syncache entry > Q> allocation. > > UMA_ZONE_ZINIT flag for uma_zcreate() sets zone zinit method to bzero. I > suggested to use M_ZERO flag for uma_zalloc(). This is correct. Unless every item is zeroed when it is freed or in an acceptable state for the next allocation you should pass M_ZERO in. > > I'm not sure this is correct, so I'm asking Jeff for clarification. AFAIU > from uma(9) manpage the zinit method is called on the first allocation. But > when an item is freed and is put to uma cache, next uma_zalloc() will just > return it from cache. If there is a ctor method, it would be called on > every allocation, but not zinit method. > > -- > Totus tuus, Glebius. > GLEBIUS-RIPN GLEB-RIPE >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060209012914.Q571>