diff options
| author | David S. Miller <davem@davemloft.net> | 2011-03-04 21:24:47 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-03-04 21:24:47 -0800 |
| commit | 44713b67db10c774f14280c129b0d5fd13c70cf2 (patch) | |
| tree | 2a5fac5524dbac7b30be6409751983b597a71766 /net/unix/af_unix.c | |
| parent | 65e8354ec13a45414045084166cb340c0d7ffe8a (diff) | |
| download | olio-linux-3.10-44713b67db10c774f14280c129b0d5fd13c70cf2.tar.xz olio-linux-3.10-44713b67db10c774f14280c129b0d5fd13c70cf2.zip | |
ipv4: Optimize flow initialization in output route lookup.
We burn a lot of useless cycles, cpu store buffer traffic, and
memory operations memset()'ing the on-stack flow used to perform
output route lookups in __ip_route_output_key().
Only the first half of the flow object members even matter for
output route lookups in this context, specifically:
FIB rules matching cares about:
dst, src, tos, iif, oif, mark
FIB trie lookup cares about:
dst
FIB semantic match cares about:
tos, scope, oif
Therefore only initialize these specific members and elide the
memset entirely.
On Niagara2 this kills about ~300 cycles from the output route
lookup path.
Likely, we can take things further, since all callers of output
route lookups essentially throw away the on-stack flow they use.
So they don't care if we use it as a scratch-pad to compute the
final flow key.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions