Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 May 2002 18:33:03 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Alfred Perlstein <bright@mu.org>
Cc:        "Andrew R. Reiter" <arr@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern uipc_socket.c
Message-ID:  <XFMail.20020521183303.jhb@FreeBSD.org>
In-Reply-To: <20020521221655.GM54960@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 21-May-2002 Alfred Perlstein wrote:
> * John Baldwin <jhb@FreeBSD.org> [020521 15:03] wrote:
>> 
>> On 21-May-2002 Alfred Perlstein wrote:
>> > * Andrew R. Reiter <arr@FreeBSD.org> [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 <jhb@FreeBSD.org>  <><  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020521183303.jhb>