svn commit: r186730 - in head...

Mark Tinguely tinguely at casselton.net
Fri Jan 30 11:29:46 PST 2009


>  Mark Tinguely wrote:
>  > Here is the "svn diff" from a week or so ago. The url is below in case
>  > the inclusion adds some extra characters.
>  > 
>  > 	http://www.casselton.net/~tinguely/arm_pmap_unmanage.diff
>  > 
>
>  Mark,
>
>  I downloaded your patch and applied it (after a few modification to get rid of compile errors). However, when I boot the board with new code it hangs. The problem is with uma allocator for pv_entries. When there is no more entries available it create new ones. It includes mapping memory into kernel using pmap_qenter. And then recurrence starts, pmap_qenter calls pmap_kenter which tries to allocate pv_entry  and so on. 
>  I think that pv_entries for pmap_kenter should be allocated from some special pool to avoid this problem. Or some threshold could be set for uma allocator to force allocation of new pv_entries if number of free entries drops below the threshold, but I am not sure if it is possible without extending uma interface.
>
>  Grzesiek

I removed the patch at the above address and replaced it with one that stores
the KVA in a the vm_page machine dependant variable pv_kva if this is the
first mapping of the page. This pv_kva value should be removed anytime
the pv_entry is removed.

The vast majority of kernel mappings will never be shared, so this should
be more effiecient than my earlier patch, and should not have the pv_entry
UMA recursion problem. Now, I should also be able to remove the test to see
if the pvzone is allocated since those pages are not shared.

I also moved some code around to simply the tests and to avoid a potential
error that has been in the pmap.c for a long time, but I just noticed it.
at line 3431 of revision 184730 in pmap_enter_locked(), the pve could have
been freed in the PG_UNMANAGED | PG_FICTITIOUS pages; the KASSERT in line 3429
would not catch the situation.

Disclaimer: This is mostly a concept. I ran cc on this file and removed
the syntax errors - sorry about that, but haven't gone much further. I
will create a cross compiling machine that runs the emulator.

--Mark Tinguely.


More information about the freebsd-arm mailing list