summaryrefslogtreecommitdiff
path: root/net/switchdev
diff options
context:
space:
mode:
authorD. Wythe <alibuda@linux.alibaba.com>2023-02-02 16:26:41 +0800
committerDavid S. Miller <davem@davemloft.net>2023-02-04 09:48:19 +0000
commit4da687448de7b51dcca9d024c6049fa223f5363f (patch)
tree22cc36871439c81d4867f08ae90d789f84e74853 /net/switchdev
parentf6421014e88983c5bb7a25c71c01ae6278a01df9 (diff)
net/smc: reduce unnecessary blocking in smcr_lgr_reg_rmbs()
Unlike smc_buf_create() and smcr_buf_unuse(), smcr_lgr_reg_rmbs() is exclusive when assigned rmb_desc was not registered, although it can be executed in parallel when assigned rmb_desc was registered already and only performs read semtamics on it. Hence, we can not simply replace it with read semaphore. The idea here is that if the assigned rmb_desc was registered already, use read semaphore to protect the critical section, once the assigned rmb_desc was not registered, keep using keep write semaphore still to keep its exclusivity. Thanks to the reusable features of rmb_desc, which allows us to execute in parallel in most cases. Signed-off-by: D. Wythe <alibuda@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev')
0 files changed, 0 insertions, 0 deletions