netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>, Amir Vadai <amirv@mellanox.com>,
	John Fastabend <john.r.fastabend@intel.com>,
	brouer@redhat.com
Subject: Re: [PATCH net-next] net: reorganize sk_buff for faster __copy_skb_header()
Date: Fri, 26 Sep 2014 10:35:32 +0200	[thread overview]
Message-ID: <20140926103532.52420a79@redhat.com> (raw)
In-Reply-To: <1411680004.16953.57.camel@edumazet-glaptop2.roam.corp.google.com>

On Thu, 25 Sep 2014 14:20:04 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> From: Eric Dumazet <edumazet@google.com>
> 
> With proliferation of bit fields in sk_buff, __copy_skb_header() became
> quite expensive, showing as the most expensive function in a GSO
> workload.
> 
> __copy_skb_header() performance is also critical for non GSO TCP
> operations, as it is used from skb_clone()
> 
> This patch carefully moves all the fields that were not copied in a
> separate zone : cloned, nohdr, fclone, peeked, head_frag, xmit_more
> 
> Then I moved all other fields and all other copied fields in a section
> delimited by headers_start[0]/headers_end[0] section so that we
> can use a single memcpy() call, inlined by compiler using long
> word load/stores.
> 
> I also tried to make all copies in the natural orders of sk_buff,
> to help hardware prefetching.
> 
> I made sure sk_buff size did not change.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---

I'm impressed, network ninja!

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

It would have been nice if you would have included the performance
improvement you saw, e.g. from:
 http://thread.gmane.org/gmane.linux.network/332035/focus=332086

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

  reply	other threads:[~2014-09-26  8:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 14:17 [PATCH net-next] mlx4: exploit skb->xmit_more to conditionally send doorbell Eric Dumazet
2014-09-25 14:43 ` Jesper Dangaard Brouer
2014-09-25 15:06   ` Eric Dumazet
2014-09-25 15:36     ` Eric Dumazet
2014-09-25 15:40       ` Eric Dumazet
2014-09-25 16:19       ` Eric Dumazet
2014-09-25 20:47       ` Eric Dumazet
2014-09-25 20:58         ` Joe Perches
2014-09-25 21:20         ` [PATCH net-next] net: reorganize sk_buff for faster __copy_skb_header() Eric Dumazet
2014-09-26  8:35           ` Jesper Dangaard Brouer [this message]
2014-09-28 21:37           ` David Miller
2014-09-29  4:06             ` David Miller
2014-09-29  4:57               ` Eric Dumazet
2014-09-29  5:18           ` [PATCH v2 " Eric Dumazet
2014-09-29 16:27             ` David Miller
2014-09-25 15:53 ` [PATCH net-next] mlx4: exploit skb->xmit_more to conditionally send doorbell Alexei Starovoitov
2014-09-25 16:05   ` Eric Dumazet
2014-09-25 16:08     ` Alexei Starovoitov
2014-09-28 21:27 ` 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=20140926103532.52420a79@redhat.com \
    --to=brouer@redhat.com \
    --cc=amirv@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=john.r.fastabend@intel.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).