On Tue, 2015-05-26 at 09:34 -0700, Tom Herbert wrote: > Use ____cacheline_aligned_in_smp to keep the fields used on socket > lookup in their own cachelines. These are read only fields and will > be often accessed on accross CPUs (would be very common with > SO_REUSEPORT for instance). > > Signed-off-by: Tom Herbert <t...@herbertland.com> > --- > include/net/sock.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/include/net/sock.h b/include/net/sock.h > index 26c1c31..bcf6114 100644 > --- a/include/net/sock.h > +++ b/include/net/sock.h > @@ -211,7 +211,13 @@ struct sock_common { > struct hlist_node skc_node; > struct hlist_nulls_node skc_nulls_node; > }; > - int skc_tx_queue_mapping; > + > + /* Cachelines above this point are read mostly and are used in socket > + * lookup. > + */ > + int skc_tx_queue_mapping > + ____cacheline_aligned_in_smp; > + > atomic_t skc_refcnt; > /* private: */ > int skc_dontcopy_end[0];
No, we do not want to increase the size of sock_common with such a hammer. I am pretty sure you never tested this patch, since you placed the attribute at the wrong place anyway. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html