Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libhns: Add support for direct wqe #1088

Merged
merged 2 commits into from
Dec 18, 2021
Merged

Conversation

Wenpeng-Liang
Copy link

Direct wqe is a mechanism to fill wqe directly into the hardware. In the
case of light load, the wqe will be filled into pcie bar space of the
hardware, this will reduce one memory access operation and therefore reduce
the latency.

The kernel parts is named "RDMA/hns: Support direct WQE of userspace".

Changes since v2:

Changes since v1:

Wenpeng Liang and others added 2 commits December 15, 2021 17:02
To commit 0045e0d3f42e ("RDMA/hns: Support direct wqe of userspace").

Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
The current write wqe mechanism is to write to DDR first, and then notify
the hardware through doorbell to read the data. Direct wqe is a mechanism
to fill wqe directly into the hardware. In the case of light load, the wqe
will be filled into pcie bar space of the hardware, this will reduce one
memory access operation and therefore reduce the latency. SIMD instructions
allows cpu to write the 512 bits at one time to device memory, thus it can
be used for posting direct wqe.

The process of post send of HIP08/09:

   +-----------+
   | post send |
   +-----+-----+
         |
   +-----+-----+
   | write WQE |
   +-----+-----+
         |
         | udma_to_device_barrier()
         |
   +-----+-----+   Y  +-----------+  N
   |  HIP09 ?  +------+ multi WR ?+-------------+
   +-----+-----+      +-----+-----+             |
         | N                | Y                 |
   +-----+-----+      +-----+-----+    +--------+--------+
   |  ring DB  |      |  ring DB  |    |direct WQE (ST4) |
   +-----------+      +-----------+    +-----------------+

Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
@Wenpeng-Liang
Copy link
Author

Gentle ping...

Hi, @rleon

Whether this PR is normal, its kernel part has been merged, thanks.
https://patchwork.kernel.org/project/linux-rdma/cover/20211207124901.42123-1-liangwenpeng@huawei.com/

_mmio_memcpy_x64_64b(dest, src);
bytecnt -= sizeof(uint64x2x4_t);
src += sizeof(uint64x2x4_t);
} while (bytecnt > 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be very careful here, bytecnt is size_t => unsigned.

@rleon
Copy link
Member

rleon commented Dec 18, 2021

Gentle ping...

Hi, @rleon

Whether this PR is normal, its kernel part has been merged, thanks. https://patchwork.kernel.org/project/linux-rdma/cover/20211207124901.42123-1-liangwenpeng@huawei.com/

Sorry for the delay

@rleon rleon merged commit cbd3995 into linux-rdma:master Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants