public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Shawn Bohrer <sbohrer@rgmadvisors.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: Performance regression from routing cache removal?
Date: Wed, 05 Jun 2013 13:52:15 -0700	[thread overview]
Message-ID: <1370465535.24311.304.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130605203253.GB2576@sbohrermbp13-local.rgmadvisors.com>

On Wed, 2013-06-05 at 15:32 -0500, Shawn Bohrer wrote:

> Indeed it does.  So what are my options here?
> 
> 1) Use fewer multicast addresses.  This may not be possible since in
> some cases I don't control the incoming data/addresses.  I am running
> a test sending the same data over ~280 vs 350 and naturally it does
> appear to be better.
> 
> 2) Make that linear scan a hash lookup?  Are there any downsides or
> reasons not to do this?
> 

It can be easily done, with a threshold : 

Above say 4 multicast addresses in the mc_list, allocate a hash table
and populate it.

Nice thing is that this hash table could be dynamically reallocated,
instead of being of fixed size, as we would keep the mc_list as well.

> 3) ?

One idea would be to extend IP early demux, currently handling only TCP
sockets, to UDP sockets.

This would work if you have no more than one socket receiving traffic to
a particular address:port, and this would avoid IP fib/dst stuff, as the
socket would have a cache of the dst.

  reply	other threads:[~2013-06-05 20:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 17:57 Performance regression from routing cache removal? Shawn Bohrer
2013-06-05 18:13 ` Eric Dumazet
2013-06-05 20:32   ` Shawn Bohrer
2013-06-05 20:52     ` Eric Dumazet [this message]
2013-06-07  0:35       ` Eric Dumazet
2013-06-07 14:48         ` Shawn Bohrer
2013-06-07 15:48           ` [PATCH net-next] igmp: hash a hash table to speedup ip_check_mc_rcu() Eric Dumazet
2013-06-07 17:33             ` Shawn Bohrer
2013-06-08  4:39             ` Cong Wang
2013-06-08  5:23               ` Eric Dumazet
2013-06-10  1:58                 ` Cong Wang
2013-06-12  7:26             ` 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=1370465535.24311.304.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sbohrer@rgmadvisors.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