about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-29 23:49:11 +0000
committerbors <bors@rust-lang.org>2018-05-29 23:49:11 +0000
commitec99b220fe0b0741edd6c9d6e05e4d0d2733a467 (patch)
tree94c87b32529ef575111261074cd3207f2e0f6cbf /src/rustllvm/RustWrapper.cpp
parent524ad9b9e03656f3fdeb03ed82fe78db3916e566 (diff)
parentc7d6a0130b6b76b65982916198e7de2b348f9718 (diff)
downloadrust-ec99b220fe0b0741edd6c9d6e05e4d0d2733a467.tar.gz
rust-ec99b220fe0b0741edd6c9d6e05e4d0d2733a467.zip
Auto merge of #50772 - nicokoch:fastcopy, r=alexcrichton
fs: copy: use copy_file_range on Linux

Linux 4.5 introduced a new system call [copy_file_range](http://man7.org/linux/man-pages/man2/copy_file_range.2.html) to copy data from one file to another.

This PR uses the new system call (if available). This has several advantages:

1. No need to constantly copy data from userspace to kernel space, if the buffer is small or the file is large
2. On some filesystems, like BTRFS, the kernel can leverage internal fs mechanisms for huge performance gains
3. Filesystems on the network dont need to copy data between the host and the client machine (they have to in the current read/write implementation)

I have created a small library that also implements the new system call for some huge performance gains here: https://github.com/nicokoch/fastcopy
Benchmark results are in the README
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions