diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-17 17:09:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-20 16:36:55 -0400 |
commit | 93ac53410a82a4f1bf2baf9d65d95cc29f2774ca (patch) | |
tree | 87f3f387777526c422c38d2fe5b400cc4d81bd55 /net/ipv4/route.c | |
parent | ba3f7f04ef2b19aace38f855aedd17fe43035d50 (diff) |
ipv4: Dirty less cache lines in route caching paths.
Don't bother incrementing dst->__use and setting dst->lastuse,
they are completely pointless and just slow things down.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 7e1c0ed0ef70..b8707779b85d 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1443,7 +1443,7 @@ static int __mkroute_input(struct sk_buff *skb, | |||
1443 | if (!(flags & RTCF_DIRECTSRC) && !itag) { | 1443 | if (!(flags & RTCF_DIRECTSRC) && !itag) { |
1444 | rth = FIB_RES_NH(*res).nh_rth_input; | 1444 | rth = FIB_RES_NH(*res).nh_rth_input; |
1445 | if (rt_cache_valid(rth)) { | 1445 | if (rt_cache_valid(rth)) { |
1446 | dst_use(&rth->dst, jiffies); | 1446 | dst_hold(&rth->dst); |
1447 | goto out; | 1447 | goto out; |
1448 | } | 1448 | } |
1449 | do_cache = true; | 1449 | do_cache = true; |
@@ -1619,7 +1619,7 @@ local_input: | |||
1619 | if (!(flags & RTCF_DIRECTSRC) && !itag) { | 1619 | if (!(flags & RTCF_DIRECTSRC) && !itag) { |
1620 | rth = FIB_RES_NH(res).nh_rth_input; | 1620 | rth = FIB_RES_NH(res).nh_rth_input; |
1621 | if (rt_cache_valid(rth)) { | 1621 | if (rt_cache_valid(rth)) { |
1622 | dst_use(&rth->dst, jiffies); | 1622 | dst_hold(&rth->dst); |
1623 | goto set_and_out; | 1623 | goto set_and_out; |
1624 | } | 1624 | } |
1625 | do_cache = true; | 1625 | do_cache = true; |
@@ -1789,7 +1789,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
1789 | if (!fnhe) { | 1789 | if (!fnhe) { |
1790 | rth = FIB_RES_NH(*res).nh_rth_output; | 1790 | rth = FIB_RES_NH(*res).nh_rth_output; |
1791 | if (rt_cache_valid(rth)) { | 1791 | if (rt_cache_valid(rth)) { |
1792 | dst_use(&rth->dst, jiffies); | 1792 | dst_hold(&rth->dst); |
1793 | return rth; | 1793 | return rth; |
1794 | } | 1794 | } |
1795 | } | 1795 | } |