Page MenuHomeFreeBSD

Simplify vm_radix_insert()
ClosedPublic

Authored by alc on Nov 28 2016, 6:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 14, 9:22 PM
Unknown Object (File)
May 9 2024, 9:22 AM
Unknown Object (File)
May 3 2024, 9:50 AM
Unknown Object (File)
May 3 2024, 9:49 AM
Unknown Object (File)
May 3 2024, 9:49 AM
Unknown Object (File)
May 3 2024, 9:11 AM
Unknown Object (File)
Feb 24 2024, 3:50 AM
Unknown Object (File)
Feb 17 2024, 12:59 AM
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.