netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next v2 3/3] udp: try to avoid 2 cache miss on dequeue
Date: Wed, 07 Jun 2017 09:56:45 +0200	[thread overview]
Message-ID: <1496822205.2409.1.camel@redhat.com> (raw)
In-Reply-To: <cdbe7b4e6758719d3e02938f05c8575d009e2822.1496756090.git.pabeni@redhat.com>

Hi David,

On Tue, 2017-06-06 at 16:23 +0200, Paolo Abeni wrote:
> when udp_recvmsg() is executed, on x86_64 and other archs, most skb
> fields are on cold cachelines.
> If the skb are linear and the kernel don't need to compute the udp
> csum, only a handful of skb fields are required by udp_recvmsg().
> Since we already use skb->dev_scratch to cache hot data, and
> there are 32 bits unused on 64 bit archs, use such field to cache
> as much data as we can, and try to prefetch on dequeue the relevant
> fields that are left out.
> 
> This can save up to 2 cache miss per packet.
> 
> v1 -> v2:
>   - changed udp_dev_scratch fields types to u{32,16} variant,
>     replaced bitfield with bool
> 
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Can you please keep on-hold this series a little time? the lkp-robot
just reported a performance regression on v1 which I have still to
investigate. I can't look at it really soon, but I expect the same
should apply to v2.

It sounds quite weird to me, since the bisected patch touches the UDP
code only and the regression is on apachebench.

Thank you,

Paolo

  parent reply	other threads:[~2017-06-07  7:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 14:23 [PATCH net-next v2 0/3] udp: reduce cache pressure Paolo Abeni
2017-06-06 14:23 ` [PATCH net-next v2 1/3] net: factor out a helper to decrement the skb refcount Paolo Abeni
2017-06-06 14:23 ` [PATCH net-next v2 2/3] udp: avoid a cache miss on dequeue Paolo Abeni
2017-06-06 20:53   ` Eric Dumazet
2017-06-06 14:23 ` [PATCH net-next v2 3/3] udp: try to avoid 2 " Paolo Abeni
2017-06-06 20:58   ` Eric Dumazet
2017-06-07  7:56   ` Paolo Abeni [this message]
2017-06-07 14:10     ` David Miller
2017-06-09 15:44       ` Paolo Abeni
2017-06-09 16:33         ` 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=1496822205.2409.1.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    /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).