netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <therbert@google.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2] Receive Packet Steering
Date: Mon, 13 Jul 2009 15:04:51 -0700	[thread overview]
Message-ID: <65634d660907131504u35154059m5934cca3cb9363e0@mail.gmail.com> (raw)
In-Reply-To: <20090713.104950.121936768.davem@davemloft.net>

On Mon, Jul 13, 2009 at 10:49 AM, David Miller <davem@davemloft.net> wrote:
>
> From: Tom Herbert <therbert@google.com>
> Date: Sun, 3 May 2009 21:03:01 -0700
>
> > @@ -758,6 +758,8 @@ struct net_device
> >       void                    *ax25_ptr;      /* AX.25 specific data */
> >       struct wireless_dev     *ieee80211_ptr; /* IEEE 802.11 specific data,
> >                                                  assign before registering */
> > +     u16                     *rps_map;
> > +     int                     rps_map_len;
> >
> >  /*
> >   * Cache line mostly used on receive path (including eth_type_trans())
>
> So essentially this table is a user defined (via sysctl) group of cpus
> among which to distribute incoming traffic for a device, right?

Yes.  It's a simple static table.

>
> Why not take this to it's logical end point, which is to monitor
> transmits using a tiny flow lookup table, and map receives of the same
> flow to the same cpu?

Is it better do use transmits, or monitor where recvmsg was called?

>
> You can even "cheat" and not store the whole flow key in the small
> lookup table, just use the resulting hash value as the key.  Also,
> if "best effort" is considered OK you can even do away with hash
> chaining as well, further decreasing the space cost of the table.

Right.  In fact, just using the hash as the key is what you want when
device provides the hash (i.e. Toeplitz).  The caveat is that we
should to prevent OOO packets when threads migrate, I think I have a
reasonable solution for that following your earlier suggestion.

I hope to have a new patch soon for steering packets to application
CPU and using device hash, thanks for bugging me on it!

>
> If your goal is to steer traffic to the cpu on which the receiving
> application is operating, that seems to me to be the only way to
> reliably and consistently hit that target.

  reply	other threads:[~2009-07-13 22:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-04  4:03 [PATCH v2] Receive Packet Steering Tom Herbert
2009-05-04  5:30 ` Eric Dumazet
2009-05-04  6:10   ` Eric Dumazet
2009-05-04  7:13   ` Eric Dumazet
2009-05-12 17:28   ` Tom Herbert
2009-05-04  7:08 ` Eric Dumazet
2009-05-04  7:59 ` Andi Kleen
2009-05-04 18:22 ` Jarek Poplawski
2009-05-04 20:43   ` Jarek Poplawski
2009-06-10  8:23 ` David Miller
2009-06-15  5:54   ` Tom Herbert
     [not found]   ` <65634d660906142252y6f7fc021l844b172995c10044@mail.gmail.com>
2009-06-15  9:02     ` David Miller
2009-06-15 16:39       ` Tom Herbert
2009-06-15 23:18         ` David Miller
2009-07-13 17:49 ` David Miller
2009-07-13 22:04   ` Tom Herbert [this message]
2009-07-14 19:33     ` David Miller
2009-07-14 23:28       ` Tom Herbert
2009-07-17  2:48         ` David Miller
2009-07-17 18:05           ` Tom Herbert
2009-07-17 18:08             ` David Miller
2009-07-17 19:59               ` Tom Herbert
2009-07-18  3:54                 ` 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=65634d660907131504u35154059m5934cca3cb9363e0@mail.gmail.com \
    --to=therbert@google.com \
    --cc=davem@davemloft.net \
    --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).