]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: optimize for smc_sndbuf_sync_sg_for_device and smc_rmb_sync_sg_for_cpu
authorGuangguan Wang <guangguan.wang@linux.alibaba.com>
Thu, 14 Jul 2022 09:44:01 +0000 (17:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jul 2022 10:19:17 +0000 (11:19 +0100)
commit66383cefaff9e147ba0b624bdff3cbdb3e78d07b
tree4eef442d258216d382747071b839592992519931
parent1a813a624404d9f3d3844d924f86502a8219a5c3
net/smc: optimize for smc_sndbuf_sync_sg_for_device and smc_rmb_sync_sg_for_cpu

Some CPU, such as Xeon, can guarantee DMA cache coherency.
So it is no need to use dma sync APIs to flush cache on such CPUs.
In order to avoid calling dma sync APIs on the IO path, use the
dma_need_sync to check whether smc_buf_desc needs dma sync when
creating smc_buf_desc.

Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_core.c
net/smc/smc_core.h
net/smc/smc_ib.c
net/smc/smc_ib.h