realm-io: fix bidi_zero_copy#157
Merged
Merged
Conversation
Contributor
Author
|
下面是一份简单的性能测试 在本机搭建 speedtest-rust 服务器,使用 librespeed-cli 作为客户端,realm 在回环接口上转发。 原版realm的性能(单线程)下载 上传 zero copy版realm的性能(单线程)下载 上传 注意:39Gbps/13Gbps 不是 realm 的性能极限,是speedtest-rust和librespeed-cli的性能极限 |
Collaborator
|
LGTM. Thank you for the fix and detailed reasoning! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复linux下失效的零拷贝函数bidi_zero_copy
系统调用总是失败,错误信息为:
原因是调用splice函数时,长度参数超过了内核最大限制,usize_t在强制转换成ssize_t时溢出
https://github.com/torvalds/linux/blob/c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9/fs/splice.c#L1340
https://github.com/torvalds/linux/blob/c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9/fs/read_write.c#L451-L457