On Tue, 2008-05-13 at 14:09 -0400, Rik van Riel wrote:
Duh! I was reading "page_mapcount()", 'cause that's what I've been
considering using for this purpose.
OK. I can test the more general case down the road.
Well, all anon pages are shared right after fork(), right? They only
become private once they've been written to. I don't have a feel for
the relative numbers of shared anon vs COWed anon--either in general or
in the swap cache.
I suppose I can just go ahead and use this version with my stress load
and count the times when I could have freed the swap cache entry, but
didn't because it's mapped in multiple address spaces. Later ... :)
--