llvm-project/utils/bazel/llvm_configs
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
..
BUILD.bazel
abi-breaking.h.cmake
config.h.cmake [Support] Revert posix_fallocate in resize_file 2021-12-20 11:16:03 -08:00
llvm-config.h.cmake [Bazel] Add LLVM_BUILD_* variables to llvm-config.h to mirror ec37e0bbaf 2021-12-16 20:56:16 +01:00