summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorVlad Buslov2018-07-23 09:55:39 +0200
committerSaeed Mahameed2018-09-06 06:14:56 +0200
commit83033688b7ade18d2dbbcefa810f02ff66ba549d (patch)
treebd0e1f5d9a10124476220f36445e91a65af29d7b /include/linux/mlx5/driver.h
parentnet: lan743x_ptp: make function lan743x_ptp_set_sync_ts_insert() static (diff)
downloadkernel-qcow2-linux-83033688b7ade18d2dbbcefa810f02ff66ba549d.tar.gz
kernel-qcow2-linux-83033688b7ade18d2dbbcefa810f02ff66ba549d.tar.xz
kernel-qcow2-linux-83033688b7ade18d2dbbcefa810f02ff66ba549d.zip
net/mlx5: Change flow counters addlist type to single linked list
In order to prevent flow counters stats work function from traversing whole flow counters tree while searching for deleted flow counters, new list to store deleted flow counters will be added to struct mlx5_fc_stats. However, the flow counter structure itself has no space left to store any more data in first cache line. To free space that is needed to store additional list node, convert current addlist double linked list (two pointers per node) to atomic single linked list (one pointer per node). Lockless NULL-terminated single linked list data type doesn't require any additional external synchronization for operations used by flow counters module (add single new element, remove all elements from list and traverse them). Remove addlist_lock that is no longer needed. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Amir Vadai <amir@vadai.me> Reviewed-by: Paul Blakey <paulb@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/mlx5/driver.h')
-rw-r--r--include/linux/mlx5/driver.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 7a452716de4b..c00549293982 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -584,9 +584,7 @@ struct mlx5_irq_info {
struct mlx5_fc_stats {
struct rb_root counters;
- struct list_head addlist;
- /* protect addlist add/splice operations */
- spinlock_t addlist_lock;
+ struct llist_head addlist;
struct workqueue_struct *wq;
struct delayed_work work;