Skip to content

utmpx: share the lock wait budget across records - #16285

Open
mattsu2020 wants to merge 4 commits into
uutils:mainfrom
mattsu2020:utmpx/shared-lock-wait-budget
Open

mattsu2020 wants to merge 4 commits into
uutils:mainfrom
mattsu2020:utmpx/shared-lock-wait-budget

Conversation

@mattsu2020

@mattsu2020 mattsu2020 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Limit Linux utmp record-lock waits to a shared ten-second budget per iterator, so contention on successive records cannot restart the full timeout. Test the policy with a short private budget instead of making the suite wait ten seconds.

Depends on #16284 and #16233. Review this change.

@codspeed

codspeed Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning, 1 note

⚠️ 122 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

ℹ️ 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

✅ 405 untouched benchmarks
⏩ 70 skipped benchmarks1


Comparing mattsu2020:utmpx/shared-lock-wait-budget (cb242d0) with main (a68dc1e)

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

Open and validate a nonblocking descriptor, then select it for libc via
/proc/self/fd. Keep getutxent for record reads and locking.

Cover FIFO rejection, path replacement, invalid inputs and cleanup.
Use one test-only helper for the uucore unit tests and who FIFO test.
Keep the helper inside uucore so it is included in the crate package.
@mattsu2020
mattsu2020 force-pushed the utmpx/shared-lock-wait-budget branch from c763fae to cb242d0 Compare November 10, 2026 06:35

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.

1 participant