[ELF] Move PPC32Got2Section into Arch/PPC.cpp (#184383)
Move PPC32Got2Section from SyntheticSections.h/cpp into the anonymous
namespace in Arch/PPC.cpp, renaming it to Got2Section.
Extracted from #184292. Moved initTargetSpecificSections after ctor and
before other hooks to match the linker's pass order.
[ELF] Move MIPS synthetic sections into Arch/Mips.cpp (#184384)
Move MipsAbiFlagsSection, MipsOptionsSection, MipsReginfoSection, and
MipsRldMapSection from SyntheticSections.h/cpp into Arch/Mips.cpp.
The MIPS-specific section creation in createSyntheticSections is
replaced
by the initTargetSpecificSections hook.
[clang-doc] Improve complexity of Index construction (#182621)
The existing implementation ends up with an O(N^2) algorithm due to
repeated linear scans during index construction. Switching to a
StringMap allows us to reduce this to O(N), since we no longer need to
search the vector.
The `BM_Index_Insertion` benchmark measures the time taken to insert N
unique records into the index.
| Scale (N Items) | Baseline (ns) | Patched (ns) | Speedup | Change |
|----------------:|--------------:|-------------:|--------:|-------:|
| 10 | 9,977 | 11,004 | 0.91x | +10.3% |
| 64 | 69,249 | 69,166 | 1.00x | -0.1% |
| 512 | 1,932,714 | 525,877 | 3.68x | -72.8% |
| 4,096 | 92,411,535 | 4,589,030 | 20.1x | -95.0% |
| 10,000 | 577,384,945 | 12,998,039 | 44.4x | -97.7% |
The patch delivers significant improvements to scalability. At 10,000
[12 lines not shown]
More consistent use of TREE_* macros in AVL comparators
Where is it appropriate and obvious, use TREE_CMP(), TREE_ISIGN() and
TREE_PCMP() instead or direct comparisons. It can make the code a lot
smaller, less error prone, and easier to read.
Sponsored-by: TrueNAS
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18259
[DirectX][ResourceAccess] Resolve resource handles at access (#182106)
This change resolves handles (or corresponding ptr) that all point into
a unique global resource by propagating an index into that global
resource through control flow.
If a unique global resource can't be resolved, an error is reported
instead.
This specifically resolves all handles that point into the same global
resource array.
Resolves: https://github.com/llvm/llvm-project/issues/165288
By reporting an error, this is part of resolving
https://github.com/llvm/llvm-project/issues/179303.
Fix vdev_rebuild_range() tx commit
The spa_sync thread waits on ->spa_txg_zio and will set ZIO_WAIT_DONE
before running the sync tasks. The dmu_tx_commit() call must be done
after we add the child zio to the ->spa_txg_zio parent otherwise its
possible the child is added after txg_sync has waited.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #18276
[Github] Bump clang-format/clang-tidy to v22.1.0 (#184374)
Per the version policy for these tools to bump them at the beginning of
the release cycle and at the end of the release cycle.
[clang-doc] Improve complexity of Index construction
The existing implementation ends up with an O(N^2) algorithm due to
repeated linear scans during index construction. Switching to a
StringMap allows us to reduce this to O(N), since we no longer need to
search the vector.
The `BM_Index_Insertion` benchmark measures the time taken to insert N
unique records into the index.
| Scale (N Items) | Baseline (ns) | Patched (ns) | Speedup | Change |
|----------------:|--------------:|-------------:|--------:|-------:|
| 10 | 9,977 | 11,004 | 0.91x | +10.3% |
| 64 | 69,249 | 69,166 | 1.00x | -0.1% |
| 512 | 1,932,714 | 525,877 | 3.68x | -72.8% |
| 4,096 | 92,411,535 | 4,589,030 | 20.1x | -95.0% |
| 10,000 | 577,384,945 | 12,998,039 | 44.4x | -97.7% |
The patch delivers significant improvements to scalability. At 10,000
[13 lines not shown]
[clang-doc] Add basic benchmarks for library functionality (#182620)
clang-doc's performance is good, but we suspect it could be better. To
track this with more fidelity, we can add a set of GoogleBenchmarks that
exercise portions of the library. To start we try to track high level
items that we monitor via the TimeTrace functions, and give them their
own micro benchmarks. This should give us more confidence that switching
out data structures or updating algorthms will have a positive
performance impact.
Note that an LLM helped generate portions of the benchmarks and
parameterize them. Most of the internal logic was written by me, but
the LLM was used to handle boilerplate and adaptation to the harness.
NAS-140088 / 26.0.0-BETA.1 / Add resilience to sysdataset move (#18334)
Allow for temporary files in sysdataset that 'disappear' between rsync
scan and transfer.
This was discovered during repeated runs of the NFS CI
`test_pool_delete_with_attached_share`
It generated this error:
`E truenas_api_client.exc.ClientException: [EFAULT] This pool contains
system dataset, but its reconfiguration failed: [EFAULT] Failed to rsync
from /var/db/system: file has vanished: "/var/db/system/nfs/.etab.lock"
E rsync warning: some files vanished before they could be transferred
(code 24) at main.c(1338) [sender=3.4.1]`
The pool export fails because rsync exits with code 24 ("some files
vanished") when /var/db/system/nfs/.etab.lock disappears mid-transfer —
a normal condition when NFS is active. The current middleware is
treating code 24 as fatal.
The rsync.py plugin has RsyncReturnCode.VANISHED = 24 marked non-fatal.
This PR makes sysdataset.py consistent with that.