Messages in this thread | | | From | Benno Senoner <> | Subject | Re: mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and makes Linux unusable | Date | Wed, 25 Aug 1999 20:12:13 +0200 |
| |
On Wed, 25 Aug 1999, Andrea Arcangeli wrote: > On Wed, 25 Aug 1999, Benno Senoner wrote: > > >will mlock() automatically cause all pages to be read from the file ? > > Yes. > > >But since I already do an mlockall() at the beginnig, there is no need of > >additional mlock()s > > Yes (if you use MCL_FUTURE). > > Andrea
Yes, I run with mlockall(MCL_CURRENT|MCL_FUTURE) I can confirm this now: I just removed my memcpy()s for testing purposes, and the app loads the data nicely. Pratically this means that if you enabled MCL_FUTURE, mmap() will return only after all the mapped segment of the file resides in memory. Correct me please if I am wrong.
regards, Benno.
- 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/
| |