Messages in this thread | | | Date | Mon, 06 Mar 2000 11:51:31 +0000 | From | John Ripley <> | Subject | Re: [PATCH] mincore for i386 Linux 2.3.49 |
| |
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/
| |