Use iterators instead of tailq_next pointers in vm_fault_populate().
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
BTW, is there a difference in performance between iter_stride(, 1) and iter_stride(, 512)? I suppose the stride 1 needs much less pctrie walking.
If yes, it might make sense to keep the m[npages - 1] walk step.
Comment Actions
The time it takes to stride from x to y depends on the most significant bit where x and y differ, so a stride by 1 from 511 to 512 would take as long as a stride by 512 from 0 to 512. If x and y differ first in bit b, then we have to climb ceil(b/4) steps up the tree and ceil(b/4) steps down to get from the node that points to page x to the node that points to page y.
Comment Actions
Drop the iterator entirely. The unlock/relocks mean we'd have to reset it before every use, so it's not worth anything. Just use lookups.