lkml.org 
[lkml]   [2000]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

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