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:
>
> I'm also not convinced that only increasing the page count in the critical
> section in map_user_kiobuf is enough because swap_out doesn't care about the
> page count (in 2.2.x rawio it's taking the page lock). The page count is
> significant as a "pin" only for the page cache and not for anonymous or shm
> memory for example.

The page count is (or should be) sufficient, and if it weren't sufficient
that would be a bug in the swap-out handling of anonymous or shm memory. I
refuse to see page locking or similar for this kind of pinning (counts are
recursive and re-entrant, a "lock bit" is not).

Anonymous pages that get swapped out use the page cache too, so it's all
safe (it's _not_ safe in 2.0.x or possibly even 2.2.x for shm, but 2.4.x
should be ok - if it's not we need to fix it in the shm_swap function, not
in the kiobuf code).

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:45    [W:0.079 / U:3.200 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site