diff options
Diffstat (limited to 'src/split.c')
-rw-r--r-- | src/split.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/split.c b/src/split.c index d872ec56a..09209cc5a 100644 --- a/src/split.c +++ b/src/split.c @@ -32,6 +32,7 @@ #include "alignalloc.h" #include "die.h" #include "error.h" +#include "fadvise.h" #include "fd-reopen.h" #include "fcntl--.h" #include "full-write.h" @@ -1621,6 +1622,9 @@ main (int argc, char **argv) /* Binary I/O is safer when byte counts are used. */ xset_binary_mode (STDIN_FILENO, O_BINARY); + /* Advise the kernel of our access pattern. */ + fdadvise (STDIN_FILENO, 0, 0, FADVISE_SEQUENTIAL); + /* Get the optimal block size of input device and make a buffer. */ if (fstat (STDIN_FILENO, &in_stat_buf) != 0) |