linux-mips
[Top] [All Lists]

Re: changing the page properties to cached/uncached

To: pulsar@kpsws.com
Subject: Re: changing the page properties to cached/uncached
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Fri, 10 Feb 2006 16:01:02 +0000
Cc: linux-mips@linux-mips.org
In-reply-to: <13126.194.171.252.101.1139502756.squirrel@mail.kpsws.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060210.005104.63742308.anemo@mba.ocn.ne.jp> <13126.194.171.252.101.1139502756.squirrel@mail.kpsws.com>
Sender: linux-mips-bounce@linux-mips.org
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

> - As we mmap outside the kernel sdram (<48MB), mmap creates new pages
> which are initialized to uncached, e.g. it assumes I/O)

You can provide your own "nopage" method. Good example is
sound/oss/via82cxxx_audio.c 



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