llvm-project/llvm/include/llvm/Config
Fangrui Song 98e0b2cf70 [Support] Revert posix_fallocate in resize_file
This reverts 3816c53f04 and removes follow-up
fixups.

The original intention was to show error earlier (posix_fallocate time) than
later for ld.lld but it appears to cause some problems which make it not free.

* FreeBSD ZFS: EINVAL, not too bad.
* FreeBSD UFS: according to khng "devastatingly slow on freebsd because UFS on freebsd does not have preallocation support like illumos. It zero-fills."
* NetBSD: maybe EOPNOTSUPP
* Linux tmpfs: unless tmpfs is set up to use huge pages (requires CONFIG_TRANSPARENT_HUGE_PAGECACHE=y), I can consistently demonstrate ~300ms delay for a 1.4GiB output.
* Linux ext4: I don't measure any benefit, either backed by a hard disk or by a file in tmpfs.
* The current code organization of `defined(HAVE_POSIX_FALLOCATE)` costs us a macro dispatch for AIX.

I think we should just remove it. I think if posix_fallocate ever finds demonstrable benefit,
it is likely Linux specific and will not need HAVE_POSIX_FALLOCATE, and possibly opt-in by some specific programs.

In a filesystem with CoW and compression, the ENOSPC benefit may be lost as well.

Reviewed By: khng300

Differential Revision: https://reviews.llvm.org/D115957
2021-12-20 11:16:03 -08:00
..
AsmParsers.def.in
AsmPrinters.def.in
Disassemblers.def.in
TargetMCAs.def.in [MCA] Moving the target specific CustomBehaviour impl. from /tools/llvm-mca/ to /lib/Target/. 2021-07-28 11:23:18 -07:00
Targets.def.in
abi-breaking.h.cmake fix some Wundef warnings in public headers 2020-11-23 20:17:46 -05:00
config.h.cmake [Support] Revert posix_fallocate in resize_file 2021-12-20 11:16:03 -08:00
llvm-config.h.cmake Re-apply "Only define LLVM_EXTERNAL_VISIBILITY when building libLLVM dylib" 2021-12-16 09:25:41 -08:00