net: cacheline adjust struct netns_frags for better frag performance
This small cacheline adjustment of struct netns_frags improves performance significantly for the fragmentation code. Struct members 'lru_list' and 'mem' are both hot elements, and it hurts performance, due to cacheline bouncing at every call point, when they share a cacheline. Also notice, how mem is placed together with 'high_thresh' and 'low_thresh', as they are used in the compare operations together. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
656a05c899
commit
cd39a7890a
@@ -3,9 +3,12 @@
|
|||||||
|
|
||||||
struct netns_frags {
|
struct netns_frags {
|
||||||
int nqueues;
|
int nqueues;
|
||||||
atomic_t mem;
|
|
||||||
struct list_head lru_list;
|
struct list_head lru_list;
|
||||||
|
|
||||||
|
/* Its important for performance to keep lru_list and mem on
|
||||||
|
* separate cachelines
|
||||||
|
*/
|
||||||
|
atomic_t mem ____cacheline_aligned_in_smp;
|
||||||
/* sysctls */
|
/* sysctls */
|
||||||
int timeout;
|
int timeout;
|
||||||
int high_thresh;
|
int high_thresh;
|
||||||
|
Reference in New Issue
Block a user