Chuck Lever wrote:
>
> + * Because the status of a page can change after mincore() checks it
> + * but before it returns to the application, the returned vector may
> + * contain stale information. Only locked pages are guaranteed to
> + * remain in memory.
I'm probably missing something, but does this mean there isn't a way of
checking absolutely if a page is in memory without potentionally causing
it to page? If you need to lock the page first, then:
mlock(page) - pages in
mlockall(MCL_CURRENT) - pages everything
mlockall(MCL_FUTURE) - unlocks all pages
mlockall(MCL_CURRENT|MCL_FUTURE) - pages everything
The only call here which would guarentee no paging after the call is
mlockall(MCL_FUTURE), which has the side effect of unlocking everything
currently paged. Is there some concurrency-safe way of doing this
without causing paging?
-- John Ripley, empeg Ltd. http://www.empeg.com- 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/
This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:19 EST