Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2008 15:33:02 -0700
From:      "Artem Belevich" <fbsdlist@src.cx>
To:        "Julian Elischer" <julian@elischer.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Freebsd IP Forwarding performance (question, and some info) [7-stable, current, em, smp]
Message-ID:  <ed91d4a80807071533r5a93d24cpd01b5ec0f3b2c835@mail.gmail.com>
In-Reply-To: <48727BA9.6020702@elischer.org>
References:  <4867420D.7090406@gtcomm.net> <486FFF70.3090402@gtcomm.net> <48701921.7090107@gtcomm.net> <4871E618.1080500@freebsd.org> <20080708002228.G680@besplex.bde.org> <48724238.2020103@freebsd.org> <20080708034304.R21502@delplex.bde.org> <20080708045135.V1022@besplex.bde.org> <ed91d4a80807071227q5d9ca283g59270a1ab92c80a9@mail.gmail.com> <48727BA9.6020702@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>  Prefetching when you are waiting for the data isn't a help.

Agreed. Got to start prefetch around <put your memory latency here>ns
before you actually need the data and move on doing other things that
do not depend on the data you've just started prefetching.

>  what you need is a speculative prefetch where you an tell teh processor "We
> will probably need the following address so start getting it while we go do
> other stuff".

It does not have to be 'speculative' either. In this particular case
we have very good idea that we *will* need some data from ethernet
header and, probably, IP and TCP headers as well. We might as well tel
the hardware to start pulling data in without stalling the CPU. Intel
has instructions specifically for this purpose. I assume AMD has them
too.

--Artem



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