lkml.org 
[lkml]   [1999]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and makes Linux unusable
Date
From
> > 	ptr=mmap(blah)
> > mlock(ptr, ...)
> > munmap(ptr, len)
>
> will mlock() automatically cause all pages to be read from the file ?
> (I don't think)

> But since I already do an mlockall() at the beginnig, there is no need of
> additional mlock()s

From man mlock

All pages which contain a
part of the specified memory range are guaranteed be resi-
dent in RAM when the mlock system call returns success-
fully and they are guaranteed to stay in RAM until the
pages are unlocked by munlock or munlockall

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

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