Re: [PATCH] recognize MAP_LOCKED in mmap() call

From: Andrew Morton (akpm@digeo.com)
Date: Wed Sep 25 2002 - 11:35:40 EST


Hubertus Franke wrote:
>
> ...
> This is what the manpage says...
>
> mlockall disables paging for all pages mapped into the
> address space of the calling process. This includes the
> pages of the code, data and stack segment, as well as
> shared libraries, user space kernel data, shared memory
> and memory mapped files. All mapped pages are guaranteed
> to be resident in RAM when the mlockall system call
> returns successfully and they are guaranteed to stay in
> RAM until the pages are unlocked again by munlock or
> munlockall or until the process terminates or starts
> another program with exec. Child processes do not inherit
> page locks across a fork.
>
> Do you read that all pages must be faulted in apriori ?

For MCL_FUTURE.

> Or is it sufficient to to make sure non of the currently mapped
> pages are swapped out and future swapout is prohibited.

I'd say that we should try to make all the pages present. But
if it's a problem for (say) a hugepage implementation then it's
unlikely that the world would end if these things were still
demand paged in.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 22:00:22 EST