]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/async/rdma: implement function to prefetch buffers
authorChangcheng Liu <changcheng.liu@aliyun.com>
Fri, 2 Aug 2019 03:23:08 +0000 (11:23 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 23 Aug 2019 06:36:05 +0000 (14:36 +0800)
commit2754d60f6615024c76f09d22d2480a9b69369a12
tree852496079b8d39cf8e33a0d6c9d9097baf3cbbe6
parent9b63845ad15ce88fe7d47a764f37523e65f08480
msg/async/rdma: implement function to prefetch buffers

The original RDMAConnectedSocketImpl::read read date from buffers and
prefertch data into buffers for next round of reading. It makes the
logical a little complex and the code isn't smooth to be read.
In this patch:
1) RDMAConnectedSocketImpl::buffer_prefetch private API is added to
prefetch data into buffers at the head of read_buffers.
2) reduce one time of calling notify() to reduce context switches.
It's really not needed to notify upper layer to read data since current
read operation hasn't finished yet.
3) Simplify RDMAConnectedSocketImpl::read implementation.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/msg/async/rdma/RDMAConnectedSocketImpl.cc
src/msg/async/rdma/RDMAStack.h