-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
specialize io::copy to use copy_file_range, splice or sendfile #75272
Commits on Nov 13, 2020
-
specialize io::copy to use copy_file_range, splice or sendfile
Currently it only applies to linux systems. It can be extended to make use of similar syscalls on other unix systems.
Configuration menu - View commit details
-
Copy full SHA for 1623647 - Browse repository at this point
Copy the full SHA 1623647View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5eb88fa - Browse repository at this point
Copy the full SHA 5eb88faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 67a6059 - Browse repository at this point
Copy the full SHA 67a6059View commit details -
prioritize sendfile over splice since it results in fewer context swi…
…tches when sending to pipes splice returns to userspace when the pipe is full, sendfile just blocks until it's done, this can achieve much higher throughput
Configuration menu - View commit details
-
Copy full SHA for cd3bddc - Browse repository at this point
Copy the full SHA cd3bddcView commit details -
add forwarding specializations for &mut variants
`impl Write for &mut T where T: Write`, thus the same should apply to the specialization traits
Configuration menu - View commit details
-
Copy full SHA for 0624730 - Browse repository at this point
Copy the full SHA 0624730View commit details -
reduce syscalls by inferring FD types based on source struct instead …
…of calling stat() also adds handling for edge-cases involving large sparse files where sendfile could fail with EOVERFLOW
Configuration menu - View commit details
-
Copy full SHA for 46e7fbe - Browse repository at this point
Copy the full SHA 46e7fbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for ad9b07c - Browse repository at this point
Copy the full SHA ad9b07cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f5d272 - Browse repository at this point
Copy the full SHA 7f5d272View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18bfe2a - Browse repository at this point
Copy the full SHA 18bfe2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 888b103 - Browse repository at this point
Copy the full SHA 888b103View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3dfc377 - Browse repository at this point
Copy the full SHA 3dfc377View commit details -
do direct splice syscall and probe availability to get android builds…
… to work Android builds use feature level 14, the libc wrapper for splice is gated on feature level 21+ so we have to invoke the syscall directly. Additionally the emulator doesn't seem to support it so we also have to add ENOSYS checks.
Configuration menu - View commit details
-
Copy full SHA for 4854d41 - Browse repository at this point
Copy the full SHA 4854d41View commit details -
Always handle EOVERFLOW by falling back to the generic copy loop
Previously EOVERFLOW handling was only applied for io::copy specialization but not for fs::copy sharing the same code. Additionally we lower the chunk size to 1GB since we have a user report that older kernels may return EINVAL when passing 0x8000_0000 but smaller values succeed.
Configuration menu - View commit details
-
Copy full SHA for bbfa92c - Browse repository at this point
Copy the full SHA bbfa92cView commit details