]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: mvm: align reorder buffer entries to cacheline
authorJohannes Berg <johannes.berg@intel.com>
Wed, 3 Jul 2024 09:58:50 +0000 (12:58 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 4 Jul 2024 11:50:04 +0000 (13:50 +0200)
The entries[] array needs to be cacheline aligned to avoid false
sharing between different queues, each queue has a set of entries
in it that it writes to.

While it is aligned in practice today given that each array entry
before it is aligned, it's still clearer to explicitly require it
to be aligned, so add the annotation for that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240703125541.3bc7a55ac867.Id3c1df6d40e92c3de9caededcbc32d0e57e4423d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

index 227463522b7c6369515ed4d869228d9efb9b13db..056fdc42e253a072f25c14808bd1d1b9ef09bf62 100644 (file)
@@ -798,7 +798,7 @@ struct iwl_mvm_baid_data {
        struct iwl_mvm_baid_data __rcu **rcu_ptr;
        struct iwl_mvm *mvm;
        struct iwl_mvm_reorder_buffer reorder_buf[IWL_MAX_RX_HW_QUEUES];
-       struct iwl_mvm_reorder_buf_entry entries[];
+       struct iwl_mvm_reorder_buf_entry entries[] ____cacheline_aligned_in_smp;
 };
 
 static inline struct iwl_mvm_baid_data *