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


On Fri, 20 Oct 2000, Andrea Arcangeli wrote:
>
> The page count of the mapped pages should be ok, it seems those mapped pages
> have a reference count of 1 just from the vmalloc allocation and they use
> PG_reserved just to skip swap_out, but I feel safer too if the bttv maintainers
> will check it and send it to you themself after checking it's correct. (I only
> verified that it was compiling correctly)

Note that the page count should _not_ be one: the page could should be
1+nr_of_mappings.

Basically, the "nopage()" function has to do a "get_page(page)". But if
the page is marked PG_reserved, that would hide a bug in a drievr that
doesn't do that part.

Also, I suspect some drivers do the "remap_page_range() one page at a
time", and again exactly due to page count issues remap_page_range() will
refuse to touch pages that aren't marked PG_reserved. So I wholeheartedly
agree with your change, but I just suspect it will break drivers that have
depended on the fact that PG_reserved means that they can be lazy and not
bother about getting all the details right.

Not that I mind breaking drivers in general, but not right now.

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.400 / U:0.036 seconds]
©2003-2011 Jasper Spaans. Advertise on this site