lkml.org 
[lkml]   [2000]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mapping user space buffer to kernel address space


On Mon, 16 Oct 2000, Andrea Arcangeli wrote:
>
> If the page isn't locked swap_out will unmap it from the pte and anybody will
> be able to start any kind of regular VM I/O on the page.

Doesn't matter.

If you have increased the page count, the page _will_ stay in the page
cache. So everybody who wants to see the page that was mapped, will see it
with no possibility of getting an alias.

> This isn't what the
> programmer expects

If so, the programmer has shit for brains. That simple.

> and that's not what I consider pinning.

No. Because "pinning" is _stupid_.

Imagine having two threads that both do direct IO from overlapping pages.

YOU NEED TO COUNT THE PINNING.

A "lock" bit is useless, and anybody who uses a lock bit is stupid and
ends up having to serialize things for no good reason.

Instead, the Linux answer is to say: pinning is bad, pinning is stupid,
pinning is useless - so dont do it.

Instead, we have the notion of "I have a reference to this page, don't let
it go away". Sure, the page can be _unmapped_ (ie it is not pinned), but
WHO CARES?

Nobody.

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/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.068 / U:0.084 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site