From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: netdev@vger.kernel.org
Subject: GRO after RPS?
Date: Sun, 25 Apr 2010 17:09:33 -0700 (PDT) [thread overview]
Message-ID: <20100425.170933.190068177.davem@davemloft.net> (raw)
Herbert, after thinking about some ideas we've been discussing and
some suggestions from folks like Tom Herbert, I'm thinking of changing
it such that we do GRO after RPS sends the packet to a remove cpu.
The idea being that, this way, if we have a device provided ->rxhash
we can elide touching the packet headers entirely.
Initially I wanted to defer the eth_type_trans() by adding a state bit
to sk_buff, and making ->ndo_type_trans() a new netdev op. The state
bit exists so that we can have a transition period and avoid doing
the type_trans multiple times if the driver still does it early.
So, in this way, when RPS doesn't even need to touch the packet
headers, due to a device provided skb->rxhash, we can defer the
type_trans all the way to the remote cpu.
The only thing getting in the way of this is GRO, since it wants to
parse the packet headers too for flow matching.
At first I thought this was a bad idea to defer GRO to the remote cpu,
since if we do batch things up it means we have less packets to queue
up to the remote cpu.
But upon further consideration it doesn't matter, because GRO is going
to fuddle with the packets and link them up into a list anyways.
So if the list handling is a wash, then it's a real win to defer GRO
and thus potentially all packet header touching to the remote cpu.
Also, we can add the quick ->rxhash check to the GRO flow matcher
like we discussed several times in the past. And guess what? Now
that RPS runs first, we'll always have a valid skb->rhash available
for this purpose since RPS will compute one in software for us :-)
So Herbert, any objections before I start hacking on this?
next reply other threads:[~2010-04-26 0:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 0:09 David Miller [this message]
2010-04-26 0:49 ` GRO after RPS? Herbert Xu
2010-04-26 1:17 ` David Miller
2010-04-26 1:40 ` Changli Gao
2010-04-26 1:47 ` Herbert Xu
2010-04-26 1:41 ` Herbert Xu
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=20100425.170933.190068177.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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).