netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Cc: Shawn Bohrer <sbohrer@rgmadvisors.com>,
	Amir Vadai <amirv@mellanox.com>, <netdev@vger.kernel.org>
Subject: Re: low latency/busy poll feedback and bugs
Date: Wed, 7 Aug 2013 22:05:01 +0200	[thread overview]
Message-ID: <1375905901.27403.22.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <52013F9A.9020005@linux.intel.com>

On Tue, 2013-08-06 at 21:25 +0300, Eliezer Tamir wrote:
> On 06/08/2013 21:08, Shawn Bohrer wrote:
> > On Tue, Aug 06, 2013 at 10:41:48AM +0300, Eliezer Tamir wrote:
> >> For multicast, it is possible that incoming packets to come from more
> >> than one port (and therefore more than one queue).
> >> I'm not sure how we could handle that, but what we have today won't do
> >> well for that use-case.
> >  
> > It is unclear to me exactly what happens in this case.  With my simple
> > patch I'm assuming it will spin on the receive queue that received the
> > last packet for that socket.  What happens when a packet arrives on a
> > different receive queue than the one we were spinning on? I assume it
> > is still delivered but perhaps the spinning process won't get it until
> > the spinning time expires?  I'm just guessing and haven't attempted to
> > figure it out from looking through the code.
> 
> What will happen is that the current code will only busy poll on one
> queue, sometimes on this one, sometimes on that one.
> 
> packets arriving on the other queue will still be serviced but will
> suffer the latency of waiting for NAPI to schedule.
> 
> So your avg will be better, but your std. dev. much worse and it's
> probably not worth it if you really expect two devices to receive
> data at the same time.

It seems like sk_mark_napi_id() should only be called on connected
sockets for now.

At least Solarflare controllers have 'wildcard' filters that can match
destination address (host, l4proto, port) only.  Perhaps ARFS could be
extended to include steering based on destination address when there is
a single unconnected socket bound to that address.  When that is
successful, busy- polling a single NAPI context should work nicely.

Where there are multiple unconnected sockets bound to the same unicast
address, it might make sense for polling on those sockets to prefer the
'local' NAPI context according to CPU topology.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2013-08-07 20:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 21:22 low latency/busy poll feedback and bugs Shawn Bohrer
2013-08-05 22:16 ` [PATCH net-next] net: Add low-latency/polling support for UDP multicast Shawn Bohrer
2013-08-06  7:13   ` Eliezer Tamir
2013-08-06 19:51     ` [PATCH v2 " Shawn Bohrer
2013-08-07 20:22       ` Eric Dumazet
2013-08-08  8:46         ` Eliezer Tamir
2013-08-08 23:55           ` Eric Dumazet
2013-08-11  7:59             ` Eliezer Tamir
2013-08-06  7:41 ` low latency/busy poll feedback and bugs Eliezer Tamir
2013-08-06 18:08   ` Shawn Bohrer
2013-08-06 18:25     ` Eliezer Tamir
2013-08-07 20:05       ` Ben Hutchings [this message]
2013-08-07 20:23         ` Eric Dumazet
2013-08-07 23:41           ` David Miller
2013-08-06 20:39   ` Or Gerlitz
2013-08-06 21:02     ` Eric Dumazet
2013-08-06 12:15 ` Amir Vadai

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=1375905901.27403.22.camel@deadeye.wl.decadent.org.uk \
    --to=bhutchings@solarflare.com \
    --cc=amirv@mellanox.com \
    --cc=eliezer.tamir@linux.intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).