]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/simple: apply prefetch policy more precisely 10344/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 19 Jul 2016 07:48:21 +0000 (15:48 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 19 Jul 2016 08:04:43 +0000 (16:04 +0800)
commitd5c12af0bab3e810314cdb75e40165bbc9ad56d6
treeb5e6a00fd27e0b7f54d8bf49d1f6b861df8c564c
parentd1f681a2741ac805d1a21087023147dddd218940
msg/simple: apply prefetch policy more precisely

We shall apply prefetch policy based on the residual length aftering
checking cache instead of the original request length.

E.g., if the reading sequences are 1K, 5K, 2K, the improved logic
will trigger another prefetch of 4K(as 5K - 3K(from recv_buf) == 2K, and we
now have 8K prefetched data total) by the second 5K reading(which we
don't do this according to the old logic), and thus the last reading request
which asks for 2K data can be also benefited from this prefetch too,
which is good for performance.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/msg/simple/Pipe.cc