Previously, we iterated over all CPUs using CPU_FOREACH and checked
individual bits to count valid CPUs. Refactor this to use a bitwise AND
and popcount to count the number of enabled bits directly.
Details
Details
- Reviewers
markj - Commits
- rGe387d9438ba0: smp: Use bitwise operation to count cpu number
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Thanks! Thought I sucessfully booted up on a AMD64 machine, this patch touches the basic logic of smp so I will think twice before landing it.
Comment Actions
It's probably ok, but yes it's a good idea to keep patches in a local tree that you test often. Then you can build some confidence in the changes before landing them.