lkml.org 
[lkml]   [2002]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Short question about the mmap method
Tommy Reynolds wrote:
>
> Uttered "Steffen Persvold" <sp@scali.no>, spoke thus:
>
> > Hi lkml readers,
> >
> > I have a question regarding drivers implementing the mmap and nopage methods.
> > In some references I've read that pages in kernel allocated memory (either
> > allocated with kmalloc, vmalloc or__get_free_pages) should be set to reserved
> > (mem_map_reserve or set_bit(PG_reserved, page->flags) before they can be
> > mmap'ed to guarantee that they can't be swapped out. Is this true ?
>
> [kv]malloc memory is _never_ subject to paging and can be mmap'ed with a
> vengeance without resorting to mucking about with marking pages or the like.
>
> You're working too hard ;-)
>

OK, thanks. But I found out that if you want to use remap_page_range on kmalloc'ed memory you need
to set the reserve bit first. Without it, it just doesn't work. When using the nopage method no
reserving is necessary.


What about my question regarding locking the mm spinlock table before traversing the page table (for
vmalloc'ed memory). Any ideas there ?

Regards,
--
Steffen Persvold | Scalable Linux Systems | Try out the world's best
mailto:sp@scali.no | http://www.scali.com | performing MPI implementation:
Tel: (+47) 2262 8950 | Olaf Helsets vei 6 | - ScaMPI 1.12.2 -
Fax: (+47) 2262 8951 | N0621 Oslo, NORWAY | >300MBytes/s and <4uS latency
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.058 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site