Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2006 09:19:13 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org, Sam Leffler <sam@errno.com>
Subject:   Re: cvs commit: src/sys/netinet tcp_var.h
Message-ID:  <200606190919.13866.jhb@freebsd.org>
In-Reply-To: <449552C9.7060203@freebsd.org>
References:  <200606171757.k5HHvahf087725@repoman.freebsd.org> <20060618080019.B60374@maildrop.int.zabbadoz.net> <449552C9.7060203@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> =A0<>< =A0http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org



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