{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/50772","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/50772/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/50772/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/50772/events","html_url":"https://github.com/rust-lang/rust/pull/50772","id":323243378,"number":50772,"title":"fs: copy: use copy_file_range on Linux","user":{"login":"nicokoch","id":3924281,"avatar_url":"https://avatars0.githubusercontent.com/u/3924281?v=4","gravatar_id":"","url":"https://api.github.com/users/nicokoch","html_url":"https://github.com/nicokoch","followers_url":"https://api.github.com/users/nicokoch/followers","following_url":"https://api.github.com/users/nicokoch/following{/other_user}","gists_url":"https://api.github.com/users/nicokoch/gists{/gist_id}","starred_url":"https://api.github.com/users/nicokoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicokoch/subscriptions","organizations_url":"https://api.github.com/users/nicokoch/orgs","repos_url":"https://api.github.com/users/nicokoch/repos","events_url":"https://api.github.com/users/nicokoch/events{/privacy}","received_events_url":"https://api.github.com/users/nicokoch/received_events","type":"User","site_admin":false},"labels":[{"id":583426710,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false}],"state":"open","locked":false,"assignee":{"login":"TimNN","id":1178249,"avatar_url":"https://avatars3.githubusercontent.com/u/1178249?v=4","gravatar_id":"","url":"https://api.github.com/users/TimNN","html_url":"https://github.com/TimNN","followers_url":"https://api.github.com/users/TimNN/followers","following_url":"https://api.github.com/users/TimNN/following{/other_user}","gists_url":"https://api.github.com/users/TimNN/gists{/gist_id}","starred_url":"https://api.github.com/users/TimNN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimNN/subscriptions","organizations_url":"https://api.github.com/users/TimNN/orgs","repos_url":"https://api.github.com/users/TimNN/repos","events_url":"https://api.github.com/users/TimNN/events{/privacy}","received_events_url":"https://api.github.com/users/TimNN/received_events","type":"User","site_admin":false},"assignees":[{"login":"TimNN","id":1178249,"avatar_url":"https://avatars3.githubusercontent.com/u/1178249?v=4","gravatar_id":"","url":"https://api.github.com/users/TimNN","html_url":"https://github.com/TimNN","followers_url":"https://api.github.com/users/TimNN/followers","following_url":"https://api.github.com/users/TimNN/following{/other_user}","gists_url":"https://api.github.com/users/TimNN/gists{/gist_id}","starred_url":"https://api.github.com/users/TimNN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimNN/subscriptions","organizations_url":"https://api.github.com/users/TimNN/orgs","repos_url":"https://api.github.com/users/TimNN/repos","events_url":"https://api.github.com/users/TimNN/events{/privacy}","received_events_url":"https://api.github.com/users/TimNN/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2018-05-15T14:28:32Z","updated_at":"2018-05-24T15:56:37Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/50772","html_url":"https://github.com/rust-lang/rust/pull/50772","diff_url":"https://github.com/rust-lang/rust/pull/50772.diff","patch_url":"https://github.com/rust-lang/rust/pull/50772.patch"},"body":"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.\r\n\r\nThis PR uses the new system call (if available). This has several advantages:\r\n\r\n1. No need to constantly copy data from userspace to kernel space, if the buffer is small or the file is large\r\n2. On some filesystems, like BTRFS, the kernel can leverage internal fs mechanisms for huge performance gains\r\n3. 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)\r\n\r\nI have created a small library that also implements the new system call for some huge performance gains here: https://github.com/nicokoch/fastcopy\r\nBenchmark results are in the README"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/391767099","html_url":"https://github.com/rust-lang/rust/pull/50772#issuecomment-391767099","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/50772","id":391767099,"user":{"login":"nicokoch","id":3924281,"avatar_url":"https://avatars0.githubusercontent.com/u/3924281?v=4","gravatar_id":"","url":"https://api.github.com/users/nicokoch","html_url":"https://github.com/nicokoch","followers_url":"https://api.github.com/users/nicokoch/followers","following_url":"https://api.github.com/users/nicokoch/following{/other_user}","gists_url":"https://api.github.com/users/nicokoch/gists{/gist_id}","starred_url":"https://api.github.com/users/nicokoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicokoch/subscriptions","organizations_url":"https://api.github.com/users/nicokoch/orgs","repos_url":"https://api.github.com/users/nicokoch/repos","events_url":"https://api.github.com/users/nicokoch/events{/privacy}","received_events_url":"https://api.github.com/users/nicokoch/received_events","type":"User","site_admin":false},"created_at":"2018-05-24T15:56:37Z","updated_at":"2018-05-24T15:56:37Z","author_association":"NONE","body":"@TimNN I have added the benchmark results and some notes in my repo's readme:\r\nhttps://github.com/nicokoch/fastcopy"}}
{"actor":{"display_login":"nicokoch"}}