Page MenuHomeFreeBSD

vm_map: use page iterators in pmap_enter
ClosedPublic

Authored by dougm on Fri, Apr 18, 8:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 29, 12:18 AM
Unknown Object (File)
Wed, Apr 23, 8:14 PM
Unknown Object (File)
Wed, Apr 23, 12:56 PM
Unknown Object (File)
Wed, Apr 23, 11:29 AM
Unknown Object (File)
Wed, Apr 23, 9:28 AM
Unknown Object (File)
Wed, Apr 23, 6:44 AM
Unknown Object (File)
Wed, Apr 23, 4:34 AM
Unknown Object (File)
Wed, Apr 23, 3:18 AM
Subscribers

Details

Summary

Change vm_map_pmap_enter to use pctrie iterators to iterate over pages, rather than using TAILQ links.

Diff Detail

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

Event Timeline

dougm requested review of this revision.Fri, Apr 18, 8:24 PM
dougm created this revision.
sys/vm/vm_map.c
2739–2740

Why is this not vm_radix_iter_jump()?

sys/vm/vm_map.c
2739–2740

We don't need to examine the page 511 pages ahead. We need to add 511 here so that the next page we examine will be the one 512 pages ahead, after step() adds one more to the index value. We would have to examine at least a couple of pctrie nodes to get to the page 511 pages ahead that we wouldn't have to examine if we went directly to the page 512 pages ahead.

sys/vm/vm_map.c
2739–2740

Doesn't iter_jump() perform mostly the same: set up the new index and then look up the page at it?

Anyway, let me formulate my question in more generic way: the += mask op exposes the iterator implementation, which is unfortunate. Can we add some primitive to the set of iterator' ops, to be used there? I thought that the iter_jump() function is exactly what is needed, if you have more optimal proposal, I fully agree.

dougm retitled this revision from vm_map: replace TAILQ_NEXT with VM_RADIX_FORALL to vm_map: use page iterators in pmap_enter.
dougm edited the summary of this revision. (Show Details)

Avoid modifying pages.index.

This revision is now accepted and ready to land.Fri, Apr 18, 11:35 PM
This revision was automatically updated to reflect the committed changes.