lkml.org 
[lkml]   [2005]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/21] mm: zap_pte_range dont dirty anon
Hugh Dickins <hugh@veritas.com> wrote:
>
> > What is the page is (for example) clean swapcache, having been recently
> > faulted in. If this pte indicates that this process has modified the page
> > and we don't run set_page_dirty(), the page could be reclaimed and the
> > change is lost.
>
> Absolutely. But either the page is unique to this mm, shared only with
> swapcache: in which case we're about to do a free_swap_cache on it (that
> may be delayed in actually freeing the swap because of not getting page
> lock, presumably because vmscan just got to it, but no matter), and we
> don't care at all that the page no longer represents what's on swap disk.
>
> Or, the page is shared with another mm. But it's an anonymous page
> (a private page), so it's shared via fork, and COW applies to it.

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

\
 
 \ /
  Last update: 2005-09-26 08:17    [from the cache]
©2003-2011 Jasper Spaans