[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1312171013050.5720@tomh.mtv.corp.google.com>
Date: Tue, 17 Dec 2013 10:15:36 -0800 (PST)
From: Tom Herbert <therbert@...gle.com>
To: davem@...emloft.net, edumazet@...gle.com, netdev@...r.kernel.org
Subject: PATCH] net: Cache align dst refcnt
ipv4_dst_check is coming up very high in perf top for TCP_RR tests and
it really is not doing much interesting. Looks like we have false
sharing with dst->refcnt. This patch cache aligns refcnt. There were
already some comments in the code that refcnt needs to be cache aligned.
Signed-off-by: Tom Herbert <therbert@...gle.com>
---
include/net/dst.h | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/include/net/dst.h b/include/net/dst.h
index 44995c1..265b4cd 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -85,17 +85,12 @@ struct dst_entry {
#endif
/*
- * Align __refcnt to a 64 bytes alignment
- * (L1_CACHE_SIZE would be too much)
- */
-#ifdef CONFIG_64BIT
- long __pad_to_align_refcnt[2];
-#endif
- /*
* __refcnt wants to be on a different cache line from
* input/output/ops or performance tanks badly
*/
- atomic_t __refcnt; /* client references */
+ atomic_t __refcnt ____cacheline_aligned_in_smp;
+ /* client references */
+
int __use;
unsigned long lastuse;
union {
--
1.8.5.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists