All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	netdev-owner@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp
Date: Tue, 21 Mar 2017 15:49:16 -0700	[thread overview]
Message-ID: <CALx6S36OBcdbk==Fi-bqO0BdAFzk1TkL76PPUwUQ8Dgz518zBw@mail.gmail.com> (raw)
In-Reply-To: <c965b4cc8b5f81cc17836f91423935f5@codeaurora.org>

On Sat, Mar 18, 2017 at 7:07 PM, Subash Abhinov Kasiviswanathan
<subashab@codeaurora.org> wrote:
>> Less than 1% performance improvement in a benchmark doesn't justify
>> the complexity of the patch. Eric's hypothesis was that an unconnected
>> UDP socket may show issues because of cache misses in look-ups due to
>> so many different sources. This should be fairly easy to benchmark by
>> randomly setting source address in your test (IP any and routing my
>> need to be set appropriately).
>>
>
> With different source addresses, a larger increase is seen here
> (633->654Mbps).
>
Thanks for running the tests. It's obviously not a huge win at least
relative to performance improvement we got from early demux, but I
suppose with very specific and engineered loads this might have value.
Please include this is next patch sets.

Generally, I think a good goal moving forward would be a to apply the
0 or 1 times rule for connection lookup. That is for any transport
tuple in a receive packet we want to do at most one connection lookup.
So early demux would need to apply to unconnected sockets and then we
wouldn't have to do the second lookup in UDP (or TCP for a SYN)
receive (note we also do an extra lookup for GRO with UDP
encapsulation). A reason we haven't this before might be that the
lookup may actually find the wrong socket (for example we go into a
different network namespace). Maybe the stack should consider any
lookup result outside of the protocol stack to be provisional (and it
would be super nice if we could somehow cache a dst with an
unconnected socket also ;-) )

Tom

>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project

  parent reply	other threads:[~2017-03-21 22:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10  3:31 [PATCH net-next v2] net: Add sysctl to toggle early demux for tcp and udp Subash Abhinov Kasiviswanathan
2017-03-10  3:42 ` Tom Herbert
2017-03-10  5:26   ` Subash Abhinov Kasiviswanathan
2017-03-10 16:33     ` Tom Herbert
2017-03-11  0:22       ` Eric Dumazet
2017-03-11  0:49         ` Tom Herbert
2017-03-18 17:32           ` Subash Abhinov Kasiviswanathan
2017-03-18 17:44             ` Tom Herbert
2017-03-19  2:07               ` Subash Abhinov Kasiviswanathan
2017-03-19 19:18                 ` Eric Dumazet
2017-03-21 22:49                 ` Tom Herbert [this message]
2017-03-10  4:25 ` Eric Dumazet
2017-03-10  7:34   ` Subash Abhinov Kasiviswanathan
2017-03-10 12:42 ` kbuild test robot
2017-03-10 12:44 ` kbuild test robot

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='CALx6S36OBcdbk==Fi-bqO0BdAFzk1TkL76PPUwUQ8Dgz518zBw@mail.gmail.com' \
    --to=tom@herbertland.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev-owner@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=subashab@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.