From owner-cvs-src@FreeBSD.ORG Thu Feb 9 09:31:20 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D484C16A420; Thu, 9 Feb 2006 09:31:20 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from webaccess-cl.virtdom.com (webaccess-cl.virtdom.com [216.240.101.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6295D43D49; Thu, 9 Feb 2006 09:31:20 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from [10.0.0.1] (67-40-203-22.tukw.qwest.net [67.40.203.22]) (authenticated bits=0) by webaccess-cl.virtdom.com (8.13.1/8.13.1) with ESMTP id k199VHnm090948; Thu, 9 Feb 2006 04:31:18 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Thu, 9 Feb 2006 01:29:57 -0800 (PST) From: Jeff Roberson X-X-Sender: jroberson@10.0.0.1 To: Gleb Smirnoff In-Reply-To: <20060209091307.GY877@FreeBSD.org> Message-ID: <20060209012914.Q571@10.0.0.1> References: <200602082332.k18NWwN2039341@repoman.freebsd.org> <20060209091307.GY877@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.52 on 216.240.101.25 Cc: Qing Li , 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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2006 09:31:21 -0000 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 >