* [PATCH 13/16] ipv4: Dirty less cache lines in route caching paths.
@ 2012-07-19 21:36 David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-19 21:36 UTC (permalink / raw)
To: netdev
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 13/16] ipv4: Dirty less cache lines in route caching paths.
@ 2012-07-20 21:26 David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-20 21:26 UTC (permalink / raw)
To: netdev
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>
---
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 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;
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-20 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 21:36 [PATCH 13/16] ipv4: Dirty less cache lines in route caching paths David Miller
-- strict thread matches above, loose matches on Subject: below --
2012-07-20 21:26 David Miller
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).