Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, ncardwell@google.com, ycheng@google.com,
	willemb@google.com
Subject: Re: [PATCH net-next] tcp: change tcp_skb_pcount() location
Date: Sun, 28 Sep 2014 16:37:07 -0400 (EDT)	[thread overview]
Message-ID: <20140928.163707.607592212098788571.davem@davemloft.net> (raw)
In-Reply-To: <1411557082.15395.24.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 24 Sep 2014 04:11:22 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> Our goal is to access no more than one cache line access per skb in
> a write or receive queue when doing the various walks.
> 
> After recent TCP_SKB_CB() reorganizations, it is almost done.
> 
> Last part is tcp_skb_pcount() which currently uses
> skb_shinfo(skb)->gso_segs, which is a terrible choice, because it needs
> 3 cache lines in current kernel (skb->head, skb->end, and
> shinfo->gso_segs are all in 3 different cache lines, far from skb->cb)
> 
> This very simple patch reuses space currently taken by tcp_tw_isn
> only in input path, as tcp_skb_pcount is only needed for skb stored in
> write queue.
> 
> This considerably speeds up tcp_ack(), granted we avoid shinfo->tx_flags
> to get SKBTX_ACK_TSTAMP, which seems possible.
> 
> This also speeds up all sack processing in general.
> 
> This speeds up tcp_sendmsg() because it no longer has to access/dirty
> shinfo.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> Note : This patch applies cleanly after "tcp: better TCP_SKB_CB layout"
> patch serie.

Also applied, thanks Eric.

      reply	other threads:[~2014-09-28 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 11:11 [PATCH net-next] tcp: change tcp_skb_pcount() location Eric Dumazet
2014-09-28 20:37 ` David Miller [this message]

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=20140928.163707.607592212098788571.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.com \
    --cc=ycheng@google.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