The loop in vm_phys_free_pages checks pa against seg->start and seg->end with every iteration. This change precomputes which loop iteration would lead to either of those tests failing, and sets an upper bound on the number of loop iterations based on those values and VM_NFREEORDER. Then it removes those bounds checks from the loop.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
Calculate the loop bound a little more efficiently. Reorder some computations within the loop to use fewer registers.