summaryrefslogtreecommitdiffstats
path: root/net/ethtool
diff options
context:
space:
mode:
authorD. Wythe <alibuda@linux.alibaba.com>2023-02-02 09:26:42 +0100
committerDavid S. Miller <davem@davemloft.net>2023-02-04 10:48:19 +0100
commitaff7bfed9097435ea38de919befbe2d7771a3e87 (patch)
treec16906013868a13495e55a16f63946d7d4f5f4bc /net/ethtool
parentnet/smc: reduce unnecessary blocking in smcr_lgr_reg_rmbs() (diff)
downloadlinux-aff7bfed9097435ea38de919befbe2d7771a3e87.tar.xz
linux-aff7bfed9097435ea38de919befbe2d7771a3e87.zip
net/smc: replace mutex rmbs_lock and sndbufs_lock with rw_semaphore
It's clear that rmbs_lock and sndbufs_lock are aims to protect the rmbs list or the sndbufs list. During connection establieshment, smc_buf_get_slot() will always be invoked, and it only performs read semantics in rmbs list and sndbufs list. Based on the above considerations, we replace mutex with rw_semaphore. Only smc_buf_get_slot() use down_read() to allow smc_buf_get_slot() run concurrently, other part use down_write() to keep exclusive semantics. Signed-off-by: D. Wythe <alibuda@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool')
0 files changed, 0 insertions, 0 deletions