summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-17 14:09:39 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-20 13:36:55 -0700
commit93ac53410a82a4f1bf2baf9d65d95cc29f2774ca (patch)
tree87f3f387777526c422c38d2fe5b400cc4d81bd55 /net
parentba3f7f04ef2b19aace38f855aedd17fe43035d50 (diff)
downloadop-kernel-dev-93ac53410a82a4f1bf2baf9d65d95cc29f2774ca.zip
op-kernel-dev-93ac53410a82a4f1bf2baf9d65d95cc29f2774ca.tar.gz
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')
-rw-r--r--net/ipv4/route.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 7e1c0ed..b870777 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1443,7 +1443,7 @@ static int __mkroute_input(struct sk_buff *skb,
if (!(flags & RTCF_DIRECTSRC) && !itag) {
rth = FIB_RES_NH(*res).nh_rth_input;
if (rt_cache_valid(rth)) {
- dst_use(&rth->dst, jiffies);
+ dst_hold(&rth->dst);
goto out;
}
do_cache = true;
@@ -1619,7 +1619,7 @@ local_input:
if (!(flags & RTCF_DIRECTSRC) && !itag) {
rth = FIB_RES_NH(res).nh_rth_input;
if (rt_cache_valid(rth)) {
- dst_use(&rth->dst, jiffies);
+ dst_hold(&rth->dst);
goto set_and_out;
}
do_cache = true;
@@ -1789,7 +1789,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
if (!fnhe) {
rth = FIB_RES_NH(*res).nh_rth_output;
if (rt_cache_valid(rth)) {
- dst_use(&rth->dst, jiffies);
+ dst_hold(&rth->dst);
return rth;
}
}
OpenPOWER on IntegriCloud