From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2] ipv4: Early TCP socket demux.
Date: Wed, 20 Jun 2012 07:49:19 +0200 [thread overview]
Message-ID: <1340171359.4604.794.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120619.214657.1345825814176201681.davem@davemloft.net>
On Tue, 2012-06-19 at 21:46 -0700, David Miller wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Tue, 19 Jun 2012 19:35:49 -0700
>
> > Any benchmark numbers?
>
> Measuring the path from ip_rcv_finish() to where we lock the socket in
> tcp_v4_rcv(), on a SPARC-T3, with a pre-warmed routing cache:
>
> Both sk and RT lookup: ~4200 cycles
> Optimized early demux: ~2800 cycles
>
> These numbers can be decreased further, because since we're already
> looking at the TCP header we can pre-cook the TCP control block in the
> SKB and skip much of the stuff that tcp_v4_rcv() does since we've done
> it already in the early demux code.
>
> > I think the number of ref count operations per packet is going to be
> > the next line in the sand.
>
> There is only one, for the socket. We haven't taken a reference on the
> route for years.
Actually this patch makes things probably slower for :
1) routers :
Each incoming tcp packet has to perform lookups
(ESTABLISHED and TIMEWAIT), adding one cache miss
2) small lived tcp sessions
input dst is now dirtied because of the additional
dst_clone()/dst_release()
1) can be solved using a knob as suggested by Changli, possibly using a
JUMP_LABEL shadowing ip_forward ?
next prev parent reply other threads:[~2012-06-20 5:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 23:39 [PATCH v2] ipv4: Early TCP socket demux David Miller
2012-06-20 0:21 ` Ben Hutchings
2012-06-20 0:54 ` David Miller
2012-06-20 1:03 ` Ben Hutchings
2012-06-20 1:05 ` David Miller
2012-06-20 2:02 ` David Miller
2012-06-20 18:16 ` Ben Hutchings
2012-06-20 2:35 ` Stephen Hemminger
2012-06-20 4:46 ` David Miller
2012-06-20 5:49 ` Eric Dumazet [this message]
2012-06-20 5:51 ` Eric Dumazet
2012-06-20 6:14 ` David Miller
2012-06-20 16:21 ` Rick Jones
2012-06-20 5:59 ` Eric Dumazet
2012-06-20 6:14 ` David Miller
2012-06-20 10:15 ` David Miller
2012-06-20 11:03 ` Eric Dumazet
2012-06-20 11:09 ` David Miller
2012-06-20 12:38 ` Eric Dumazet
2012-06-20 22:29 ` David Miller
2012-06-20 18:07 ` Ben Hutchings
2012-06-20 18:40 ` Eric Dumazet
2012-06-20 21:01 ` David Miller
2012-06-20 21:04 ` Stephen Hemminger
2012-06-20 21:17 ` Eric Dumazet
2012-06-20 21:26 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340171359.4604.794.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox