cvs commit: src/sys/netinet tcp_syncache.c

Gleb Smirnoff glebius at
Thu Feb 9 01:13:16 PST 2006

On Wed, Feb 08, 2006 at 11:32:58PM +0000, Qing Li wrote:
Q> qingli      2006-02-08 23:32:58 UTC
Q>   FreeBSD src repository
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().

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.

More information about the cvs-src mailing list