From owner-cvs-src@FreeBSD.ORG Wed Apr 21 17:58:40 2004 Return-Path: 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 35BBC16A4CF; Wed, 21 Apr 2004 17:58:40 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id C010143D45; Wed, 21 Apr 2004 17:58:39 -0700 (PDT) (envelope-from max@love2party.net) Received: from [212.227.126.207] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BGSY2-0008FQ-00; Thu, 22 Apr 2004 02:58:38 +0200 Received: from [217.227.155.3] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1BGSY2-0002az-00; Thu, 22 Apr 2004 02:58:38 +0200 From: Max Laier To: Darren Reed Date: Thu, 22 Apr 2004 02:59:38 +0000 User-Agent: KMail/1.6.1 References: <200404211527.i3LFRabS088245@repoman.freebsd.org> <6.0.1.1.1.20040422005919.03afaaa0@imap.sfu.ca> <20040422002143.GC60368@hub.freebsd.org> In-Reply-To: <20040422002143.GC60368@hub.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_hUzhAUHD/cpQ2Kx"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404220259.45651.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:e28873fbe4dbe612ce62ab869898ff08 cc: cvs-src@FreeBSD.org cc: Luigi Rizzo cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Colin Percival Subject: Re: cvs commit: src/sys/net radix.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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, 22 Apr 2004 00:58:40 -0000 --Boundary-02=_hUzhAUHD/cpQ2Kx Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 22 April 2004 00:21, Darren Reed wrote: > On Thu, Apr 22, 2004 at 01:03:42AM +0100, Colin Percival wrote: > > At 00:24 22/04/2004, Darren Reed wrote: > > >Some of these changes, for the sake of change, can be annoying... > > > > As Luigi mentioned when he started this, these aren't changes "for the > > sake of change"; rather, these are changes to clean things up so that it > > is easier to add all the necessary locking. > > Uh, really? > Changing variable names is required to make locking easier? > Changing "x =3D *(u_char *)p" into "x =3D LEN(p)" makes locking easier? In the end: Yes it does! In this particular example I can easily tell what = the=20 new version does, while I wouldn't be able to tell it from the first (w/o=20 context). It just way easier to read, keeping it obscure as all the other=20 BSDs have it this way and it was this way for years is just baloney. To put some emphasis on why this will help locking, we don't have many brav= e=20 who happen to know from top to bottom and can= =20 easily tell what "x =3D *(u_char *)p" is supposed to mean, but we have some= who=20 have a good idea how to do locking. The changes Luigi is trying to do, shou= ld=20 enable better readability of the network code to make it possible for other= s=20 to lock things down. I find readable code a good thing (even if it does not help locking). > In the end, if someone decides that the code needs to be restructured > for better performance in SMP hardware, then that's what'll happen and > changes like these will have little significance at that point in time. I don't think so. It's much easier to restructure code you can actually rea= d=20 and understand. And honest, when one sees the current radix code (etc.), th= e=20 first thing that comes to mind is "run!". Same applies to IPv6/KAME-code, b= tw=20 =2D and I didn't see anybody to work on the locking there and I know a reas= on=20 why. =2D-=20 Best regards, | mlaier@freebsd.org Max Laier | ICQ #67774661 http://pf4freebsd.love2party.net/ | mlaier@EFnet --Boundary-02=_hUzhAUHD/cpQ2Kx Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAhzUhXyyEoT62BG0RAuv6AJ9y7lsZZuRsXmTa8tJJo/nbEYjc6ACeOFu3 EOi/dlbKDG/KLlC338qCXpo= =y/kc -----END PGP SIGNATURE----- --Boundary-02=_hUzhAUHD/cpQ2Kx--