]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: do not use rwlock in fast path
authorEric Dumazet <edumazet@google.com>
Thu, 9 Feb 2017 17:10:04 +0000 (09:10 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Feb 2017 17:06:18 +0000 (12:06 -0500)
commit73c25fef64c799a981d5132bb439efdc0f569c98
tree073958fdc459566c31bf02177ada4f42ac1e3b03
parent5a53d73b111cbcc35f646c94d9311b5c02e639a7
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>
drivers/net/ethernet/mellanox/mlx4/en_clock.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h