Re: locking user memory and kiobuf

Stephen C. Tweedie (sct@redhat.com)
Mon, 8 Nov 1999 20:02:44 +0000 (GMT)


Hi,

On Sat, 06 Nov 1999 02:38:46 -0500, Juan Gonzalez <juang@gate.net> said:

> 1. From what I've read in the archives, it seems that locking user
> memory from a driver isn't supported in current releases of the Linux
> kernel (2.2.xx). Is that correct?

Right. The standard way of sharing driver memory with user space is to
allocate the memory inside the driver code first, and then to mmap()
that into user space --- not the other way around.

Do it that way, and the driver owns the memory all the time. That way
you can do whatever locking you want without having to play about with
random pages of user data.

> 2. As I understand, there's a new "kiobuf mechanism" being added in
> 2.3.xx .
> Does that provide a solution to this particular issue?

Yes.

--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/