Zbigniew Jędrzejewski-Szmek
00a8cf7763
basic/copy: use sendfile smarter
...
We called sendfile with 16kb (a.k.a. COPY_BUFFER_SIZE) as the maximum
number of bytes to copy. This seems rather inefficient, especially with
large files. Instead, call sendfile with a "large" maximum.
What "large" max means is a bit tricky: current file offset + max
must fit in loff_t. This means that as we call sendfile more than once,
we have to lower the max size.
With this patch, test-copy calls sendfile twice, e.g.:
sendfile(4, 3, NULL, 9223372036854775807) = 738760
sendfile(4, 3, NULL, 9223372036854037047) = 0
The second call is necessary to determine EOF.
2016-03-15 14:54:27 -04:00
..
2016-02-10 13:41:57 +01:00
2016-02-16 19:55:51 -05:00
2016-02-10 13:41:57 +01:00
2016-02-19 01:36:46 +06:00
2016-02-22 23:23:06 +01:00
2016-02-23 13:31:28 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-20 22:42:29 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2015-12-07 18:34:05 +01:00
2015-12-07 18:34:05 +01:00
2016-02-23 14:20:34 -08:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-23 14:20:34 -08:00
2016-02-10 16:38:56 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-26 12:33:41 +01:00
2016-02-26 11:28:49 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-03-15 14:54:27 -04:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-13 11:15:41 +01:00
2016-02-13 11:15:41 +01:00
2016-02-23 08:50:49 -05:00
2016-02-23 08:50:49 -05:00
2016-02-11 22:12:04 +01:00
2016-02-11 22:12:04 +01:00
2016-02-22 20:32:04 -08:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-13 12:28:04 +01:00
2016-02-13 12:28:04 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-27 13:40:50 +01:00
2016-02-10 13:41:57 +01:00
2016-03-02 10:42:28 -05:00
2016-02-13 12:28:04 +01:00
2016-02-13 12:28:04 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2015-11-30 21:51:03 +01:00
2016-02-20 22:42:29 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-22 23:24:47 +01:00
2016-02-10 13:41:57 +01:00
2016-02-22 20:32:04 -08:00
2016-02-10 13:41:57 +01:00
2016-02-29 10:19:01 +01:00
2016-02-21 20:58:59 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-22 20:32:04 -08:00
2016-02-23 14:20:34 -08:00
2015-11-18 23:09:02 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-23 14:20:34 -08:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-23 14:20:34 -08:00
2016-02-10 13:41:57 +01:00
2016-02-20 22:42:29 +01:00
2016-02-29 23:18:16 -05:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-13 12:28:28 +01:00
2016-02-22 17:38:34 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-03-02 00:42:49 +06:00
2016-02-10 13:41:57 +01:00
2016-02-23 14:20:34 -08:00
2016-02-10 13:41:57 +01:00
2016-01-26 14:42:03 +01:00
2016-02-10 13:41:57 +01:00
2016-02-23 14:20:34 -08:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-22 23:23:06 +01:00
2016-01-26 14:13:13 +01:00
2016-01-28 17:00:38 +01:00
2015-11-30 21:51:03 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-03-02 10:42:27 -05:00
2016-03-01 20:39:30 -05:00
2016-02-22 23:24:47 +01:00
2016-02-10 13:41:57 +01:00
2016-02-20 22:42:29 +01:00
2016-02-10 13:41:57 +01:00
2016-02-23 20:40:51 +01:00
2015-12-01 23:40:17 +01:00
2016-01-11 19:39:59 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-03-10 09:24:08 -05:00
2016-02-24 11:56:11 +01:00
2016-02-16 13:06:55 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-23 14:20:34 -08:00
2016-02-22 20:32:04 -08:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-22 20:32:04 -08:00
2016-02-10 13:41:57 +01:00
2016-02-13 11:54:39 -05:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-01-28 16:25:39 +01:00
2016-01-20 10:12:41 +01:00
2016-02-22 20:32:04 -08:00
2016-02-15 23:26:34 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-22 20:32:04 -08:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-13 11:15:41 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-23 22:32:16 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-03-02 00:42:49 +06:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00
2016-02-10 13:41:57 +01:00