Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2013 05:23:38 +0200
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Peter Wemm <peter@wemm.org>
Cc:        Lawrence Stewart <lstewart@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, Lev Serebryakov <lev@freebsd.org>, FreeBSD Net <net@freebsd.org>
Subject:   Re: it's the output, not ack coalescing (Re: TSO and FreeBSD vs Linux)
Message-ID:  <20130815032338.GA74257@onelab2.iet.unipi.it>
In-Reply-To: <CAGE5yCrdptEAK7y_qBM3Og9U45o1_0ZtN0ANXg6WwXNTqX-1GQ@mail.gmail.com>
References:  <520A6D07.5080106@freebsd.org> <520AFBE8.1090109@freebsd.org> <520B24A0.4000706@freebsd.org> <520B3056.1000804@freebsd.org> <20130814102109.GA63246@onelab2.iet.unipi.it> <587579055.20130814154713@serebryakov.spb.ru> <CAJ-VmokxgWKeuPFGEE-wzLcYpyt3Ua90JZH2BBTj39LoTSUsMg@mail.gmail.com> <CAGE5yCrdptEAK7y_qBM3Og9U45o1_0ZtN0ANXg6WwXNTqX-1GQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 14, 2013 at 12:40:19PM -0700, Peter Wemm wrote:
> On Wed, Aug 14, 2013 at 11:11 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> > On 14 August 2013 04:47, Lev Serebryakov <lev@freebsd.org> wrote:
> >
> >
> >>   And we should invalidate this info on ARP/route changes, or connection
> >>  will be lost in such cases, am I right?.. So, on each such event code
> >>  should look into all sockets and check, if routing/ARP information is
> >> still
> >>  valid for them. Or we should store lists of sockets in routing and ARP
> >>  tables... I don't know, what is worse.
> >>
> >
> > .. or per-CPU copies of the ARP table.. ?
> 
> Local cache at each consumer and check a generation number to see if
> it needs to be re-validated before using.  The obvious problem with
> this though is that big networks tend to kill your caches.

if you expect this to be problematic you can partition the entries
and use a different generation number per cluster.
Anyways if you really want to be guaranteed you need atomic
reads on the generation numbers (or ticks), which I have heard
are expensive on !i386/amd64 machines.

This is why I would probably try to live with races (which for
arp are a non problem).

	cheers
	luigi



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