From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: [PATCH 13/16] ipv4: Dirty less cache lines in route caching paths. Date: Thu, 19 Jul 2012 14:36:11 -0700 (PDT) Message-ID: <20120719.143611.1067598406157872746.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: netdev@vger.kernel.org Return-path: Received: from shards.monkeyblade.net ([149.20.54.216]:48300 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499Ab2GSVgL (ORCPT ); Thu, 19 Jul 2012 17:36:11 -0400 Received: from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net [74.93.104.98]) by shards.monkeyblade.net (Postfix) with ESMTPSA id 9632C5845A3 for ; Thu, 19 Jul 2012 14:36:13 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: 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 --- net/ipv4/route.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index e5384f1..1d4e317 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1437,7 +1437,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; @@ -1613,7 +1613,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; @@ -1783,7 +1783,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; } } -- 1.7.10.4