Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, willemb@google.com, ncardwell@google.com,
	ycheng@google.com, vanj@google.com
Subject: Re: [PATCH net] tcp: fix tcp_ack() performance problem
Date: Tue, 14 Oct 2014 15:30:59 -0400 (EDT)	[thread overview]
Message-ID: <20141014.153059.1891014679903384495.davem@davemloft.net> (raw)
In-Reply-To: <1413065849.9362.72.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 11 Oct 2014 15:17:29 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> We worked hard to improve tcp_ack() performance, by not accessing
> skb_shinfo() in fast path (cd7d8498c9a5 tcp: change tcp_skb_pcount()
> location)
> 
> We still have one spurious access because of ACK timestamping,
> added in commit e1c8a607b281 ("net-timestamp: ACK timestamp for
> bytestreams")
> 
> By checking if sk_tsflags has SOF_TIMESTAMPING_TX_ACK set,
> we can avoid two cache line misses for the common case.
> 
> While we are at it, add two prefetchw() :
> 
> One in tcp_ack() to bring skb at the head of write queue.
> 
> One in tcp_clean_rtx_queue() loop to bring following skb,
> as we will delete skb from the write queue and dirty skb->next->prev.
> 
> Add a couple of [un]likely() clauses.
> 
> After this patch, tcp_ack() is no longer the most consuming
> function in tcp stack.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks.

      reply	other threads:[~2014-10-14 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11 22:17 [PATCH net] tcp: fix tcp_ack() performance problem Eric Dumazet
2014-10-14 19:30 ` 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=20141014.153059.1891014679903384495.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=vanj@google.com \
    --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