Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 2010 09:37:29 +0530
From:      "C. Jayachandran" <c.jayachandran@gmail.com>
To:        Alan Cox <alc@cs.rice.edu>
Cc:        Kostik Belousov <kostikbel@gmail.com>, "Jayachandran C." <jchandra@freebsd.org>, mips@freebsd.org
Subject:   Re: svn commit: r208589 - head/sys/mips/mips
Message-ID:  <AANLkTilBxdXxXrWC1cAT0wX9ubmFrvaAdk4feG6PwDYQ@mail.gmail.com>
In-Reply-To: <4C0D64B7.7060604@cs.rice.edu>
References:  <AANLkTimIa3jmBPMhWIOcY6DenGpZ2ZYmqwDTWspVx0-u@mail.gmail.com> <AANLkTil2gE1niUWCHnsTlQvibhxBh7QYwD0TTWo0rj5c@mail.gmail.com> <AANLkTinA2D5iTDGPbflHVzLyAZW-ZewjJkUWWL8FVskr@mail.gmail.com> <4C07E07B.9060802@cs.rice.edu> <AANLkTimjyPc_AXKP1yaJaF1BN7CAGBeNikVzcp9OCb4P@mail.gmail.com> <4C09345F.9040300@cs.rice.edu> <AANLkTinmFOZY3OlaoKStxlNIRBt2G2I4ILkQ1P0CjozG@mail.gmail.com> <4C0D2BEA.6060103@cs.rice.edu> <AANLkTikZxx_30H9geHvZYkYd0sE-wiuZljEd0PAi14ca@mail.gmail.com> <4C0D3F40.2070101@cs.rice.edu> <20100607202844.GU83316@deviant.kiev.zoral.com.ua> <4C0D64B7.7060604@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 8, 2010 at 2:59 AM, Alan Cox <alc@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 ensur=
e
> that the memory is below 4G. =A0The crucial difference between i386 PAE a=
nd
> MIPS is that for i386 PAE only the top-level table needs to be below a
> specific address threshold. =A0Moreover, this level is allocated in a pla=
ce,
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilBxdXxXrWC1cAT0wX9ubmFrvaAdk4feG6PwDYQ>