aboutsummaryrefslogtreecommitdiff
path: root/Config.in
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartekgola@gmail.com>2014-11-27 13:20:24 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2014-11-27 23:31:58 +0100
commit8d75d794ea505003fddea8e757d43976db8d6861 (patch)
tree0aae42250953ae1de36666aa5fc12a11ad3be02f /Config.in
parentee41094b809452fdd23d25c1879a96acfcddde08 (diff)
downloadbusybox-w32-8d75d794ea505003fddea8e757d43976db8d6861.tar.gz
busybox-w32-8d75d794ea505003fddea8e757d43976db8d6861.tar.bz2
busybox-w32-8d75d794ea505003fddea8e757d43976db8d6861.zip
libbb: use sendfile() to copy data between file descriptors
Busybox already uses sendfile in httpd. This patch proposes to use it globally to copy data between file descriptors. It speeds up the copying on slow systems a lot - below are the times needed to copy a 450Mb file with and without this option enabled on a BeagleBone Black: sendfile: user 0m0.000s sys 0m8.170s read/write 4k: user 0m0.470s sys 0m16.300s function old new delta bb_full_fd_action 394 474 +80 Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'Config.in')
-rw-r--r--Config.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/Config.in b/Config.in
index b83beb52d..285fe0a19 100644
--- a/Config.in
+++ b/Config.in
@@ -264,6 +264,18 @@ config PAM
264 Use PAM in some busybox applets (currently login and httpd) instead 264 Use PAM in some busybox applets (currently login and httpd) instead
265 of direct access to password database. 265 of direct access to password database.
266 266
267config FEATURE_USE_SENDFILE
268 bool "Use sendfile system call"
269 default y
270 help
271 When enabled, busybox will use the kernel sendfile() function
272 instead of read/write loops to copy data between file descriptors
273 (for example, cp command does this a lot).
274 If sendfile() doesn't work, copying code falls back to read/write
275 loop. sendfile() was originally implemented for faster I/O
276 from files to sockets, but since Linux 2.6.33 it was extended
277 to work for many more file types.
278
267config LONG_OPTS 279config LONG_OPTS
268 bool "Support for --long-options" 280 bool "Support for --long-options"
269 default y 281 default y