aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-06-08 18:27:43 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-09 02:58:52 -0400
commitc8945043cdc687388b7a43fc6f474bddd9607e80 (patch)
treed22984bcaf0e223a471377f67dc83827f0cae7a6 /include/net/sch_generic.h
parenta09ceb0e08140a1eec05b49b4c232d3481339cb0 (diff)
sched: place state, next_sched and gso_skb in same cacheline again
Earlier commits removed two members from struct Qdisc which places next_sched/gso_skb into a different cacheline than ->state. This restores the struct layout to what it was before the removal. Move the two members, then add an annotation so they all reside in the same cacheline. This adds a 16 byte hole after cpu_qstats. The hole could be closed but as it doesn't decrease total struct size just do it this way. Reported-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r--include/net/sch_generic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 4dedb7f12ed5..49534e28824b 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -71,11 +71,11 @@ struct Qdisc {
71 struct gnet_stats_basic_cpu __percpu *cpu_bstats; 71 struct gnet_stats_basic_cpu __percpu *cpu_bstats;
72 struct gnet_stats_queue __percpu *cpu_qstats; 72 struct gnet_stats_queue __percpu *cpu_qstats;
73 73
74 struct Qdisc *next_sched;
75 struct sk_buff *gso_skb;
76 /* 74 /*
77 * For performance sake on SMP, we put highly modified fields at the end 75 * For performance sake on SMP, we put highly modified fields at the end
78 */ 76 */
77 struct Qdisc *next_sched ____cacheline_aligned_in_smp;
78 struct sk_buff *gso_skb;
79 unsigned long state; 79 unsigned long state;
80 struct sk_buff_head q; 80 struct sk_buff_head q;
81 struct gnet_stats_basic_packed bstats; 81 struct gnet_stats_basic_packed bstats;