Re: mapping user space buffer to kernel address space

From: Linus Torvalds (torvalds@transmeta.com)
Date: Sat Oct 14 2000 - 21:17:57 EST


On Sat, 14 Oct 2000, Rogier Wolff wrote:
> > Note that it is usually MUCH better to do this the other way around:
> > having a kernel-side buffer, and mapping that into user space. I don't
> > understand why so many people always want to do it the wrong way around..
>
> Provided this wasn't a retorical question, I'll answer it for you.
>
> It seems easier to people. Allocing megabytes of memory is "easy" from
> userspace, and there are all kinds of restrictions on the kernel side.

Yeah.

It's "easier".

Until you want to actually _map_ the thing.

At which point it turns a hell of a lot harder.

In short, it's a classic case of being STUPID. Taking something that looks
easy, and staying with the wrong approach long after it turns out that the
"easy" case wasn't the easy one after all.

                Linus

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



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:28 EST