svn commit: r208589 - head/sys/mips/mips

C. Jayachandran c.jayachandran at gmail.com
Tue Jun 8 04:07:30 UTC 2010


On Tue, Jun 8, 2010 at 2:59 AM, Alan Cox <alc at cs.rice.edu> wrote:
> On 6/7/2010 3:28 PM, Kostik Belousov wrote:
>>
>> Selecting a random message in the thread to ask my question.
>> Is the issue that page table pages should be allocated from the specific
>> physical region of the memory ? If yes, doesn't i386 PAE has similar
>> issue with page directory pointer table ? I see a KASSERT in i386
>> pmap that verifies that the allocated table is below 4G, but I do not
>> understand how uma ensures the constraint (I suspect that it does not).
>>
>
> For i386 PAE, the UMA backend allocator uses kmem_alloc_contig() to ensure
> that the memory is below 4G.  The crucial difference between i386 PAE and
> MIPS is that for i386 PAE only the top-level table needs to be below a
> specific address threshold.  Moreover, this level is allocated in a place,
> pmap_pinit(), where we are allowed to sleep.

Yes. I saw the PAE top level page table code and thought I could use
that mechanism for allocating MIPS page table pages in the direct
mapped memory. The other reference I used was
pmap_alloc_zeroed_contig_pages() function in sun4v/sun4v/pmap.c which
uses the vm_phys_alloc_contig() and VM_WAIT.  I had also thought of
using the VM_FREEPOOL_DIRECT which seemed to be for a similar purpose,
but could find see any usage in the kernel.


JC.


More information about the freebsd-mips mailing list