diff options
author | Eric Dumazet <edumazet@google.com> | 2017-02-09 20:10:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-15 20:06:18 +0300 |
commit | 99f5711e7c15e997c4eb34b378502ef6f3982233 (patch) | |
tree | 073958fdc459566c31bf02177ada4f42ac1e3b03 /drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | |
parent | d5bc1613d02f1c3f1226e2f7d555f0384d973482 (diff) | |
download | linux-99f5711e7c15e997c4eb34b378502ef6f3982233.tar.xz |
mlx4: do not use rwlock in fast path
Using a reader-writer lock in fast path is silly, when we can
instead use RCU or a seqlock.
For mlx4 hwstamp clock, a seqlock is the way to go, removing
two atomic operations and false sharing.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4_en.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h index cec59bc264c9..d8ca6d1794ef 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h @@ -424,9 +424,9 @@ struct mlx4_en_dev { u32 priv_pdn; spinlock_t uar_lock; u8 mac_removed[MLX4_MAX_PORTS + 1]; - rwlock_t clock_lock; u32 nominal_c_mult; struct cyclecounter cycles; + seqlock_t clock_lock; struct timecounter clock; unsigned long last_overflow_check; unsigned long overflow_period; |