Page MenuHomeFreeBSD

Remove PCPU_INC
ClosedPublic

Authored by jah on Mar 17 2021, 1:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 12:59 AM
Unknown Object (File)
Tue, Sep 30, 12:15 PM
Unknown Object (File)
Sun, Sep 28, 12:41 AM
Unknown Object (File)
Sep 5 2025, 7:27 PM
Unknown Object (File)
Aug 31 2025, 7:01 PM
Unknown Object (File)
Aug 25 2025, 5:30 PM
Unknown Object (File)
Jul 7 2025, 7:56 AM
Unknown Object (File)
Jul 5 2025, 9:44 PM

Details

Summary

e4b8deb22227 removed the last in-tree uses of PCPU_INC(). Its
potential benefit is also practically nonexistent. Non-x86
platforms already implement it as PCPU_ADD(..., 1), and according
to [0] there are no recent x86 processors for which the 'inc'
instruction provides a performance benefit over the equivalent
memory-operand form of the 'add' instruction. The only remaining
benefit of 'inc' is smaller instruction size, which in this case
is inconsequential given the limited number of per-CPU data consumers.

[0]: https://www.agner.org/optimize/instruction_tables.pdf

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jah requested review of this revision.Mar 17 2021, 1:25 AM
This revision is now accepted and ready to land.Mar 17 2021, 8:35 PM
This revision was automatically updated to reflect the committed changes.