Re: Question on memory management

From: Stephen C. Tweedie (sct@redhat.com)
Date: Fri May 26 2000 - 08:57:10 EST


Hi,

On Wed, May 24, 2000 at 04:36:19PM +0200, Jan Evert van Grootheest wrote:
>
> The mmap() system call seems to be the way for the app to do this, since
> it knows the information it needs to use it. But I'm not sure how to
> implement the mmap file operation on the driver side.

Have a look at the mmap support in the sound drivers, it does all
you should need already.

> A second question is if the page could possibly be swapped out. I'd like
> (perhaps need) to prevent that from happening. Would PG_locked do the
> trick here?

The normal mechanism is just to set the PG_Reserved bit, which tells the
VM to leave the page alone. PG_locked is just used as a temporary I/O
interlock.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:15 EST