Repository navigation
uucore: add DirFd::open_anchor for write-only directories - #15120
abendrothj wants to merge 1 commit into
Conversation
|
GNU testsuite comparison: |
Merging this PR will degrade performance by 4.8%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | five_38_bit_primes |
1.5 s | 1.8 s | -17.84% |
| ❌ | Simulation | true_consecutive_calls |
294.7 ns | 350.2 ns | -15.86% |
| ❌ | Simulation | false_consecutive_calls |
294.7 ns | 350.2 ns | -15.86% |
| ❌ | Simulation | check_sorted_utf8_locale |
422.9 ms | 492.2 ms | -14.09% |
| ❌ | Simulation | sort_numeric_utf8_locale |
36.1 ms | 40.7 ms | -11.41% |
| ❌ | Simulation | merge_single_file_utf8_locale |
119.3 ms | 133.4 ms | -10.57% |
| ❌ | Simulation | tsort_complex_dag[50000] |
87.6 ms | 97.2 ms | -9.79% |
| ❌ | Simulation | tsort_tree_dag[(10, 3)] |
36.5 ms | 39.4 ms | -7.34% |
| ❌ | Simulation | tsort_wide_dag[100000] |
157.6 ms | 167 ms | -5.64% |
| ❌ | Simulation | merge_pre_sorted_files |
238.7 ms | 252.8 ms | -5.59% |
| ❌ | Simulation | merge_pre_sorted_files_utf8_locale |
237.9 ms | 251.9 ms | -5.54% |
| ❌ | Simulation | tsort_linear_chain[1000000] |
1.9 s | 2 s | -4.75% |
| ❌ | Simulation | sort_german_de_locale |
282.1 ms | 295.1 ms | -4.41% |
| ❌ | Simulation | sort_case_sensitive[500000] |
321 ms | 334.9 ms | -4.15% |
| ❌ | Simulation | sort_spill_to_tmp_files_utf8_locale |
321 ms | 332.1 ms | -3.34% |
| ⚡ | Simulation | three_39_bit_primes |
901.6 ms | 578.3 ms | +55.9% |
| ⚡ | Simulation | sort_dictionary_order[500000] |
2.1 s | 1.9 s | +7.02% |
| ⚡ | Simulation | rm_recursive_tree |
14.4 ms | 13.7 ms | +5.28% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing abendrothj:uucore-dirfd-open-anchor (028b336) with main (fe26d56)
Footnotes
-
54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Open a directory readable, and on EACCES retry with O_PATH or O_SEARCH, which anchor *at calls without read access. The targets with either flag are named by the has_o_path and has_o_search cfg aliases. If the retry fails, its own error is returned.
991db22 to
028b336
Compare
|
Landed on main with #14779, so closing. |
Creating entries relative to a directory descriptor fails with EACCES when the directory has write and search permission but no read, because
DirFd::openopens it for reading.install -Dhits this for leading directories, andln/cp/mvwhen replacing entries.DirFd::open_anchoropens the directory readable and on EACCES retries withO_PATH(Linux, Android) orO_SEARCH(Apple targets, FreeBSD, NetBSD, illumos, Solaris), which is enough for the*atcalls. The targets gethas_o_path/has_o_searchcfg aliases in uucore's build script. If the retry fails, its own error is returned.Used by #14779 and #15122.
Part of #14778