diff options
author | Fangrui Song <i@maskray.me> | 2021-12-20 11:16:03 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-12-20 11:16:03 -0800 |
commit | 98e0b2cf700191558268728f2a8e65dfe13bf0da (patch) | |
tree | f719b5dc56c10aabc66bf6139200895604835976 /mlir/lib/Bindings/Python/PybindUtils.cpp | |
parent | e96e3912c9b626f289b7fefceacfad136259a12f (diff) | |
download | llvm-98e0b2cf700191558268728f2a8e65dfe13bf0da.zip llvm-98e0b2cf700191558268728f2a8e65dfe13bf0da.tar.gz llvm-98e0b2cf700191558268728f2a8e65dfe13bf0da.tar.bz2 |
[Support] Revert posix_fallocate in resize_file
This reverts 3816c53f040cc6aa06425978dd504b0bd5b7899c 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
Diffstat (limited to 'mlir/lib/Bindings/Python/PybindUtils.cpp')
0 files changed, 0 insertions, 0 deletions