netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Yuchung Cheng <ycheng@google.com>,
	Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH v2 net-next 7/8] net: reorganize struct sock for better data locality
Date: Mon, 05 Dec 2016 13:36:24 +0100	[thread overview]
Message-ID: <1480941384.4694.13.camel@redhat.com> (raw)
In-Reply-To: <1480792497-16607-8-git-send-email-edumazet@google.com>

Hi Eric,

On Sat, 2016-12-03 at 11:14 -0800, Eric Dumazet wrote:
> Group fields used in TX path, and keep some cache lines mostly read
> to permit sharing among cpus.
> 
> Gained two 4 bytes holes on 64bit arches.
> 
> Added a place holder for tcp tsq_flags, next to sk_wmem_alloc
> to speed up tcp_wfree() in the following patch.
> 
> I have not added ____cacheline_aligned_in_smp, this might be done later.
> I prefer doing this once inet and tcp/udp sockets reorg is also done.
> 
> Tested with both TCP and UDP.
> 
> UDP receiver performance under flood increased by ~20 % :
> Accessing sk_filter/sk_wq/sk_napi_id no longer stalls because sk_drops
> was moved away from a critical cache line, now mostly read and shared.

I cherry-picked this patch only for some UDP benchmark. Under flood with
many concurrent flows, I see this 20% improvement and a relevant
decrease in system load.

Nice work, thanks Eric!

Tested-by: Paolo Abeni <pabeni@redhat.com>

  reply	other threads:[~2016-12-05 12:36 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 [this message]
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 ` [PATCH v2 net-next 0/8] tcp: tsq: performance series 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=1480941384.4694.13.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=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).