Re: mlock'ed pages are paging out to shared mapped files?

From: Peter Zijlstra
Date: Fri Nov 26 2010 - 11:36:13 EST


On Fri, 2010-11-26 at 11:25 -0500, Bob Walters wrote:
>
> Please CC directly, I'm not subscribed.
>
> I'm writing to determine if observed mlock behavior is a bug or the
> intended implementation. The kernel seems to be paging out
> modifications made to locked pages of a shared (MAP_SHARED) memory
> mapped regular file, on Linux 2.6.35.6-48 (Fedora 14 distro, x86_64).
> Man pages implies that this might be a bug. I have a repeatable
> process involving the following test:

That's not paged-out, its a shared mapping (ie a mapped file), you dirty
the pages, we clean them by writing them out to disk.

That is the expected behaviour, if the man-page implies anything else
its bonkers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/