From owner-cvs-src@FreeBSD.ORG Mon Jun 19 14:12:48 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 3A35B16A607; Mon, 19 Jun 2006 14:12:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id D602E43D49; Mon, 19 Jun 2006 14:12:45 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k5JECVEN016579; Mon, 19 Jun 2006 10:12:36 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Andre Oppermann Date: Mon, 19 Jun 2006 09:19:13 -0400 User-Agent: KMail/1.9.1 References: <200606171757.k5HHvahf087725@repoman.freebsd.org> <20060618080019.B60374@maildrop.int.zabbadoz.net> <449552C9.7060203@freebsd.org> In-Reply-To: <449552C9.7060203@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200606190919.13866.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Mon, 19 Jun 2006 10:12:39 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1549/Sat Jun 17 18:20:39 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org, Sam Leffler Subject: Re: cvs commit: src/sys/netinet tcp_var.h 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: Mon, 19 Jun 2006 14:12:48 -0000 On Sunday 18 June 2006 09:19, Andre Oppermann wrote: > Bjoern A. Zeeb wrote: > > On Sun, 18 Jun 2006, Sam Leffler wrote: > >=20 > >> Andre Oppermann wrote: > >>> andre 2006-06-17 17:57:36 UTC > >>> > >>> FreeBSD src repository > >>> > >>> Modified files: > >>> sys/netinet tcp_var.h > >>> Log: > >>> Rearrange fields in struct syncache and syncache_head to make them= =20 > >>> more > >>> cache line friendly. > >> > >> Got any benchmarks to back this up? Or perhaps it was just the smiley > >> face your cache lines gave you :) >=20 > The entry chains are traversed quite often and the first thing looked > at is in_conninfo and then sc_rxttime and sc_rxmits. So it makes a > lot of sense to have them close together on the same cache line aligned > to the beginning of the struct and to the native alignment of the > architecture. I did not benchmark it but it is simple reasoning. I was talking with Alan Cox at USENIX ATC about working on SMP, and one of the comments he made about doing SMP stuff in the kernel in that what=20 you would intuitively think would be faster doesn't always end up that way in practice. In fact, it sometimes ends up being the opposite of what is intuitive. I agree that you should really benchmark things and not just assume they will make performance better. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org