]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: don't req_notify until all CQEs drained
authorDust Li <dust.li@linux.alibaba.com>
Tue, 1 Mar 2022 09:44:01 +0000 (17:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Mar 2022 14:25:12 +0000 (14:25 +0000)
commit5fb239f602eed893de65064a5ae9609aa2d56627
tree7f42d2f2684a796dd4966aacbe8f2f29247dc231
parent6bb4e54eec4ad4569fc25717bf7e95dd42b9f554
net/smc: don't req_notify until all CQEs drained

When we are handling softirq workload, enable hardirq may
again interrupt the current routine of softirq, and then
try to raise softirq again. This only wastes CPU cycles
and won't have any real gain.

Since IB_CQ_REPORT_MISSED_EVENTS already make sure if
ib_req_notify_cq() returns 0, it is safe to wait for the
next event, with no need to poll the CQ again in this case.

This patch disables hardirq during the processing of softirq,
and re-arm the CQ after softirq is done. Somehow like NAPI.

Co-developed-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_wr.c