> On Iau, 2006-02-09 at 17:32 +0100, Niels Sterrenburg wrote:
>> - Do not use swapping in the system
>> - Limit Linux memory usage via the mem= option in the kernel command
>> line.
>> - From MIPS user space: do a mmap for the shared memory area.
>> - From MIPS user space: call (our selfwritten) shmemipc driver with the
>> request to set the mapped pages to cached (by passing virtual address
>> and
>> length).
>> - From kernel space: find the vma for the supplied virtual address range
>> and change cache properties of all pages in that virtual range.
>
> You don't need to worry about swapping. You can simply mark the pages in
> question reserved just as i386 does with the 640K-1Mb hole or since when
> a page has a use count it won't swap out, mark it as having a user. In
> your case the "user" is the DSP so you just need to account fine
Ok, swapping is not (yet) relevant for us, but I'll keep it in mind.
> You can provide your own "nopage" method. Good example is
> sound/oss/via82cxxx_audio.c
>
So if I understand correctly I can implement my own nopage routine
as part of my driver mmap functionanlity (via initializing vm_ops in mmap).
When an mmap on my driver is done to a virtual area for which nopage's
exist then my nopage routine is called, right ?
Then I can handle tha cache properties while creating the page(s), right ?
In the case of the via82cxxx_aucio.c it grabs a dma page, claims it
and returns it, right ?
If all my above interpretations are correct, how can I then toggle the
page caching properties:
- on which level should I do that: pte/page level or vma level ?
regards,
Niels
|