Skip to content

uucore: parse PMULL hardware capability correctly - #16435

Open
AFaria20s wants to merge 2 commits into
uutils:mainfrom
AFaria20s:uucore/fix-pmull-hwcap-parsing
Open

AFaria20s wants to merge 2 commits into
uutils:mainfrom
AFaria20s:uucore/fix-pmull-hwcap-parsing

Conversation

@AFaria20s

Copy link
Copy Markdown

Correct the hardware capability mapping for PMULL and accept the full PCLMULQDQ name.

Add a regression test for both capability names.

Closes #16434

Copilot AI balanced review requested due to automatic review settings November 13, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/id/smack is no longer failing!
Congrats! The gnu test tests/mkdir/smack-no-root is no longer failing!
Congrats! The gnu test tests/mkdir/smack-root is no longer failing!
Congrats! The gnu test tests/df/skip-rootfs is now passing!

@codspeed

codspeed Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will regress 2 benchmarks

3 warnings, 1 note

⚠️ 120 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 5 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚠️ 5 benchmarks with a significant change ran in a different software environment

Their base and head results were measured with a different OS or toolchain, such as compiler, runtime or library versions, so the changes might come from this difference rather than from the code. Open an affected benchmark to see what changed.

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

⚡ 6 improved benchmarks
❌ 2 regressed benchmarks
✅ 405 untouched benchmarks
⏩ 70 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation df_deep_directory 888.3 µs 929.4 µs -4.43%
❌ CPU Simulation dd_copy_with_skip 4.8 ms 4.9 ms -3.03%
⚡ Memory socket_addrs_direct[100000] 68 KB 8.6 KB ×7.9
⚡ Memory hostname_ip_lookup[100000] 66.4 KB 9.1 KB ×7.3
⚡ CPU Simulation false_consecutive_calls 350.2 ns 294.7 ns +18.85%
⚡ CPU Simulation split_number_chunks_round_robin 32.8 ms 28.9 ms +13.4%
⚡ CPU Simulation cksum_crc 34.2 ms 33.1 ms +3.36%
⚡ CPU Simulation cksum_multiple_files 51.1 ms 49.5 ms +3.27%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing AFaria20s:uucore/fix-pmull-hwcap-parsing (e28e9d1) with main (9311390)2

Open in CodSpeed

Footnotes

  1. 70 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. ↩

  2. No successful run was found on main (a741688) during the generation of this report, so 9311390 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

Comment thread src/uucore/src/lib/features/hardware.rs Resolved
@AFaria20s

Copy link
Copy Markdown
Author

/rerun

@AFaria20s
AFaria20s requested a review from xtqqczze November 19, 2026 15:41
Comment thread src/uu/cksum/src/cksum.rs
print_feature("avx512", features.has_avx512());
print_feature("avx2", features.has_avx2());
print_feature("pclmul", features.has_pclmulqdq());
print_feature("pclmul", features.has_avx() && features.has_pclmulqdq());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please explain why pclmul is conditional on avx

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches GNU's behaviour: pclmul_supported() in cksum_crc.c gates on avx && pclmul, because that path is compiled with -mavx -mpclmul so it genuinely needs both, and the not-detected message is printed from that same value. Keeping the same conjunction keeps our --debug output aligned with GNU's.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unrelated change from this PR and open an issue to track it.

@sylvestre
sylvestre force-pushed the uucore/fix-pmull-hwcap-parsing branch from b556e2c to e28e9d1 Compare November 20, 2026 09:58
@sylvestre
sylvestre force-pushed the uucore/fix-pmull-hwcap-parsing branch from e28e9d1 to 6152c9e Compare November 21, 2026 17:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uucore: parse PMULL hardware capability correctly

3 participants