Page MenuHomeFreeBSD

Simplify vm_radix_insert()
ClosedPublic

Authored by alc on Nov 28 2016, 6:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 10:06 AM
Unknown Object (File)
Tue, Dec 10, 10:47 AM
Unknown Object (File)
Wed, Nov 27, 5:33 AM
Unknown Object (File)
Nov 21 2024, 4:55 PM
Unknown Object (File)
Nov 21 2024, 2:00 AM
Unknown Object (File)
Nov 17 2024, 6:25 PM
Unknown Object (File)
Nov 10 2024, 9:41 PM
Unknown Object (File)
Sep 9 2024, 1:24 PM
Subscribers

Details

Summary

During vm_page_cache()'s call to vm_radix_insert(), if vm_page_alloc() was called to allocate a new page of radix trie nodes, there could be a call to vm_radix_remove() on the same trie (of PG_CACHED pages) as the in-progress vm_radix_insert(). With the removal of PG_CACHED pages, we can simplify vm_radix_insert() and vm_radix_remove() by removing the flags on the root of the trie that were used to detect this case and the code for restarting the vm_radix_insert() at the trie's root when it happened.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc retitled this revision from to Simplify vm_radix_insert().
alc updated this object.
alc edited the test plan for this revision. (Show Details)
alc added reviewers: kib, markj.
alc added a subscriber: pho.
kib edited edge metadata.
This revision is now accepted and ready to land.Nov 28 2016, 6:07 PM

Three of the pmap implementations use radix tries to maintain a collection of page table pages. I found that none of them ever initialized the "rt_flags" field. A radix trie root is initialized by direct assignment to its field(s) in the user, and not with a "method".

markj edited edge metadata.

Peter, could you please test this patch.

In D8664#179617, @alc wrote:

Peter, could you please test this patch.

Sure. No problems found on amd64. Still need to do some more tests on i386.

In D8664#179751, @pho wrote:
In D8664#179617, @alc wrote:

Peter, could you please test this patch.

Sure. No problems found on amd64. Still need to do some more tests on i386.

The i386 problem seen is unrelated to this patch.

So to conclude: No problems found with this patch.

This revision was automatically updated to reflect the committed changes.