Re: [PATCH 04/21] mm: zap_pte_range dont dirty anon

From: Hugh Dickins
Date: Mon Sep 26 2005 - 02:22:00 EST


On Sun, 25 Sep 2005, Andrew Morton wrote:
>
> mmap(MAP_ANONYMOUS|MAP_SHARED)
> fork()
> swapout
> swapin
> swapoff
>
> Now we have two mm's sharing a clean, non-cowable, non-swapcache anonymous
> page, no?

No, MAP_ANONYMOUS|MAP_SHARED gives you a tmpfs object via shmem_zero_setup:
all those pages are shared file pages, not PageAnon at all.

Hugh
-
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/