From owner-cvs-all Tue May 21 15:33:53 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id 27C1A37B40D for ; Tue, 21 May 2002 15:33:42 -0700 (PDT) Received: (qmail 15044 invoked from network); 21 May 2002 22:33:40 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 21 May 2002 22:33:40 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g4LMXPF96587; Tue, 21 May 2002 18:33:26 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020521221655.GM54960@elvis.mu.org> Date: Tue, 21 May 2002 18:33:03 -0400 (EDT) From: John Baldwin To: Alfred Perlstein Subject: Re: cvs commit: src/sys/kern uipc_socket.c Cc: "Andrew R. Reiter" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 21-May-2002 Alfred Perlstein wrote: > * John Baldwin [020521 15:03] wrote: >> >> On 21-May-2002 Alfred Perlstein wrote: >> > * Andrew R. Reiter [020521 14:18] wrote: >> >> arr 2002/05/21 14:18:41 PDT >> >> >> >> Modified files: >> >> sys/kern uipc_socket.c >> >> Log: >> >> - OR the flag variable with M_ZERO so that the uma_zalloc() handles the >> >> zero'ing out of the allocated memory. Also removed the logical bzero >> >> that followed. >> > >> > This is just making something wrong prettier as well as obfuscating >> > the problem and making the XXX comment not make sense. >> >> The XXX already didn't make sense. Why do you prefer explicit bzero() >> to M_ZERO? > > The XXX made sense if you understand how the gencounts are used to > detect out of date sockets when copying out statistics into userland. Then put the XXX over the gencount not the bzero so it actually makes sense. There was no race involving the bzero(), and the poor placement of the comment doesn't make sense. Feel free to put the comment back in the right place. > I don't prefer bzero over M_ZERO, I prefer him using the UMA callbacks > to _properly_ bzero only the parts of the socket that need it. Well, proper use of UMA would also avoid having to reinit the mutexes all the time as well, but that is a lot more complicated than just replacing a bzero() with a M_ZERO for now. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message