[PATCH] Use posix_fallocate instead of ftruncate.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 13:06:08 PDT 2016


> Well, is detecting a disk full event so important to risk that it could slow
> down the linker on NFS or such? It'd depend how often you hit it, but to me
> it doesn't feel like a good trade-off.

I would probably say it is. If you are linking on nfs you probably
cannot expect any reasonable link time right now.

If we want to support that we should resurrect my patch to link to a
posix_align allocated anonymous memory and then just use write to pass
it to the os.

In any case, lets benchmark it before we start adding more #ifdefs and options.

The attached patch uses a cmake check to avoid making things worse
(but not any better) on systems that don't have posix_fallocate.

What do you want me to benchmark? Linking the current benchmarks on
NFS? Is linux as the server OK?

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PATCH-Use-posix_fallocate-instead-of-ftruncate.patch
Type: application/octet-stream
Size: 2420 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/e644bacb/attachment.obj>


More information about the llvm-commits mailing list