]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: don't send in the BH context if sock_owned_by_user
authorDust Li <dust.li@linux.alibaba.com>
Tue, 1 Mar 2022 09:44:02 +0000 (17:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Mar 2022 14:25:12 +0000 (14:25 +0000)
commit8e394b00c86946a10ab320b13e75bacadd63703d
tree2da8de087c96a637611ed2b31add76f48dd03e89
parent5fb239f602eed893de65064a5ae9609aa2d56627
net/smc: don't send in the BH context if sock_owned_by_user

Send data all the way down to the RDMA device is a time
consuming operation(get a new slot, maybe do RDMA Write
and send a CDC, etc). Moving those operations from BH
to user context is good for performance.

If the sock_lock is hold by user, we don't try to send
data out in the BH context, but just mark we should
send. Since the user will release the sock_lock soon, we
can do the sending there.

Add smc_release_cb() which will be called in release_sock()
and try send in the callback if needed.

This patch moves the sending part out from BH if sock lock
is hold by user. In my testing environment, this saves about
20% softirq in the qperf 4K tcp_bw test in the sender side
with no noticeable throughput drop.

Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c
net/smc/smc.h
net/smc/smc_cdc.c