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

KAMEZAWA Hiroyuki
2006-11-30T11:12:32Z

On Thu, 30 Nov 2006 02:45:51 -0800
"Paul Menage" <menage@google.com> wrote:

> On 11/29/06, Christoph Lameter <clameter@sgi.com> wrote:
> >
> > You do not have a problem as long as you hold a mmap_sem lock on any of
> > the vmas in which the page appears. Kame and I discussed several
> > approached on how to avoid the issue in the past but so far there was no
> > need to resolve the issue.
> >
>
> It sounds like this would be useful for memory hot-unplug too, though.
> A problem worth solving?
>
It's not solved just because 'there is no user'.
If you'll fix it, I welcome it.

> Why isn't page_lock_anon_vma() safe to use in this case? Because after
> we've established migration ptes, page_mapped() will be false and so
> page_lock_anon_vma() will return NULL?
page_lock_anon_vma() will return NULL because mapcount is 0.
We have to guarantee that we can trust anon_vma(from page->mapping0 even if
page->mapcount is 0.maybe there is several ways.

> How does kswapd do this safely?
>
kswapd doesn't touches page->mapping after page_mapcount() goes down to 0.

> Possible approach (apologies if you've already considered and rejected this):
>
As you pointed out, there will be several approaches.

I think one of the biggest concern will be performance impact. And this will
touch objrmap core, it is good to start discussion with a patch.

-Kame