[Top] [All Lists]

Re: changing the page properties to cached/uncached

To: "Alan Cox" <>
Subject: Re: changing the page properties to cached/uncached
From: "Niels Sterrenburg" <>
Date: Mon, 13 Feb 2006 09:40:06 +0100 (CET)
Importance: Normal
In-reply-to: <1139587262.12521.12.camel@localhost.localdomain>
Original-recipient: rfc822;
References: <> <> <1139587262.12521.12.camel@localhost.localdomain>
User-agent: SquirrelMail/1.4.0
> 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 ?



<Prev in Thread] Current Thread [Next in Thread>