'emc_insert_min' variable is made to align on a 64-byte boundary and this
introduces a 24 byte hole.

This patch moves the emc_insert_min member variable slightly higher in
the order to remove the hole and thus saves a cache line with the new
ordering.

Signed-off-by: Bhanuprakash Bodireddy <[email protected]>
CC: Ciara Loftus <[email protected]>
CC: Georg Schmuecking <[email protected]>
---
 lib/dpif-netdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index faadedb..006cea6 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -261,6 +261,9 @@ struct dp_netdev {
     struct dp_meter *meters[MAX_METERS]; /* Meter bands. */
     uint32_t meter_free;                 /* Next free meter. */
 
+    /* Probability of EMC insertions is a factor of 'emc_insert_min'.*/
+    OVS_ALIGNED_VAR(CACHE_LINE_SIZE) atomic_uint32_t emc_insert_min;
+
     /* Protects access to ofproto-dpif-upcall interface during revalidator
      * thread synchronization. */
     struct fat_rwlock upcall_rwlock;
@@ -292,9 +295,6 @@ struct dp_netdev {
     uint64_t last_tnl_conf_seq;
 
     struct conntrack conntrack;
-
-    /* Probability of EMC insertions is a factor of 'emc_insert_min'.*/
-    OVS_ALIGNED_VAR(CACHE_LINE_SIZE) atomic_uint32_t emc_insert_min;
 };
 
 static void meter_lock(const struct dp_netdev *dp, uint32_t meter_id)
-- 
2.4.11

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to