Hi Paul, > > I think it would be a good idea to add an option to tell tar whether > > to use POSIX_FADV_NOREUSE, POSIX_FADV_DONTNEED, or neither, since > > there may be cases where any of the three possibilities is best. > > Might make sense, yes.
I often want to run tar, sha1sum, grep, etc., on a huge file knowing that I won't do it again soon and I don't want it bullying the nice working-set cache out the door. It seems crazy every command has to add options to twiddle POSIX_FADV_NOREUSE, like dd(1)'s nocache [io]flag IIRC. We have stdbuf(1). Perhaps a similar approach can be used to affect command, even if it can't work in all cases. fadvise --noreuse sha1sum big.foo (Linux not implementing it aside. Perhaps wider use in userspace would encourage implementation.) -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy