From 23d524b50386b4006a9ca2ccbe16d3a50013fea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?YOSHIFUJI=20Hideaki=20/=20=E5=90=89=E8=97=A4=E8=8B=B1?= =?UTF-8?q?=E6=98=8E?= Date: Wed, 31 Mar 2010 22:24:22 +0000 Subject: [PATCH] --- yaml --- r: 193912 b: refs/heads/master c: bd2c77a0a749589b45f2697ea446a4438d078f9b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/ip6_fib.h | 29 ++++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 91d24f86aa34..ee8068c81817 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 152102c7f2bf191690f1069bae292ea3925adf14 +refs/heads/master: bd2c77a0a749589b45f2697ea446a4438d078f9b diff --git a/trunk/include/net/ip6_fib.h b/trunk/include/net/ip6_fib.h index 86f46c49e318..4b1dc1161c37 100644 --- a/trunk/include/net/ip6_fib.h +++ b/trunk/include/net/ip6_fib.h @@ -88,34 +88,37 @@ struct rt6_info { struct dst_entry dst; } u; - struct inet6_dev *rt6i_idev; - #define rt6i_dev u.dst.dev #define rt6i_nexthop u.dst.neighbour #define rt6i_expires u.dst.expires + /* + * Tail elements of dst_entry (__refcnt etc.) + * and these elements (rarely used in hot path) are in + * the same cache line. + */ + struct fib6_table *rt6i_table; struct fib6_node *rt6i_node; struct in6_addr rt6i_gateway; - - u32 rt6i_flags; - u32 rt6i_metric; - atomic_t rt6i_ref; - /* more non-fragment space at head required */ - unsigned short rt6i_nfheader_len; - - u8 rt6i_protocol; + atomic_t rt6i_ref; - struct fib6_table *rt6i_table; + /* These are in a separate cache line. */ + struct rt6key rt6i_dst ____cacheline_aligned_in_smp; + u32 rt6i_flags; + struct rt6key rt6i_src; + u32 rt6i_metric; - struct rt6key rt6i_dst; + struct inet6_dev *rt6i_idev; #ifdef CONFIG_XFRM u32 rt6i_flow_cache_genid; #endif + /* more non-fragment space at head required */ + unsigned short rt6i_nfheader_len; - struct rt6key rt6i_src; + u8 rt6i_protocol; }; static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)