Re: [RFC][PATCH 0/1] Node-based reclaim/migration

Paul Menage
2006-12-01T19:32:36Z

On 11/30/06, Christoph Lameter <clameter@sgi.com> wrote:
> On Thu, 30 Nov 2006, Paul Menage wrote:
>
> > Don't we need to bump the mapcount? If we don't, then the page gets
> > unmapped by the migration prep, and if we race with anyone trying to
> > map it they may allocate a new anon_vma and replace it.
>
> Allocate a new vma for an existing anon page? That never happens. We may
> do COW in which case the page is copied.

I was thinking of a new anon_vma, rather than a new vma - but I guess
that even if we do race with someone who's faulting on the page and
pulling it from the swap cache, they'll just set the page mapping to
the same value as it is already, rather than setting it to a new
value. So you're right, not a problem.

Paul