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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"