From: David Miller <davem@davemloft.net>
To: edumazet@google.com
Cc: netdev@vger.kernel.org, ycheng@google.com, eric.dumazet@gmail.com
Subject: Re: [PATCH v2 net-next 0/8] tcp: tsq: performance series
Date: Mon, 05 Dec 2016 14:06:30 -0500 (EST) [thread overview]
Message-ID: <20161205.140630.1112051018980890950.davem@davemloft.net> (raw)
In-Reply-To: <1480792497-16607-1-git-send-email-edumazet@google.com>
From: Eric Dumazet <edumazet@google.com>
Date: Sat, 3 Dec 2016 11:14:49 -0800
> Under very high TX stress, CPU handling NIC TX completions can spend
> considerable amount of cycles handling TSQ (TCP Small Queues) logic.
>
> This patch series avoids some atomic operations, but most notable
> patch is the 3rd one, allowing other cpus processing ACK packets and
> calling tcp_write_xmit() to grab TCP_TSQ_DEFERRED so that
> tcp_tasklet_func() can skip already processed sockets.
>
> This avoid lots of lock acquisitions and cache lines accesses,
> particularly under load.
>
> In v2, I added :
>
> - tcp_small_queue_check() change to allow 1st and 2nd packets
> in write queue to be sent, even in the case TX completion of
> already acknowledged packets did not happen yet.
> This helps when TX completion coalescing parameters are set
> even to insane values, and/or busy polling is used.
>
> - A reorganization of struct sock fields to
> lower false sharing and increase data locality.
>
> - Then I moved tsq_flags from tcp_sock to struct sock also
> to reduce cache line misses during TX completions.
>
> I measured an overall throughput gain of 22 % for heavy TCP use
> over a single TX queue.
Looks fantastic, series applied, thanks Eric.
prev parent reply other threads:[~2016-12-05 19:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-03 19:14 [PATCH v2 net-next 0/8] tcp: tsq: performance series Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 1/8] tcp: tsq: add tsq_flags / tsq_enum Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 2/8] tcp: tsq: remove one locked operation in tcp_wfree() Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 3/8] tcp: tsq: add shortcut in tcp_tasklet_func() Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 4/8] tcp: tsq: avoid one atomic in tcp_wfree() Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 5/8] tcp: tsq: add a shortcut in tcp_small_queue_check() Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 6/8] tcp: tcp_mtu_probe() is likely to exit early Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 7/8] net: reorganize struct sock for better data locality Eric Dumazet
2016-12-05 12:36 ` Paolo Abeni
2016-12-05 14:30 ` Eric Dumazet
2016-12-03 19:14 ` [PATCH v2 net-next 8/8] tcp: tsq: move tsq_flags close to sk_wmem_alloc Eric Dumazet
2016-12-04 0:16 ` David Miller
2016-12-04 1:13 ` Eric Dumazet
2016-12-04 1:37 ` David Miller
2016-12-05 2:45 ` Eric Dumazet
2016-12-05 19:06 ` 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=20161205.140630.1112051018980890950.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).