[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081112111931.0e40c27d.kamezawa.hiroyu@jp.fujitsu.com>
Date: Wed, 12 Nov 2008 11:19:31 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Andrea Arcangeli <aarcange@...hat.com>
Cc: Christoph Lameter <cl@...ux-foundation.org>,
Izik Eidus <ieidus@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
kvm@...r.kernel.org, chrisw@...hat.com, avi@...hat.com,
izike@...ranet.com
Subject: Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from
one page into another
On Tue, 11 Nov 2008 23:24:21 +0100
Andrea Arcangeli <aarcange@...hat.com> wrote:
> On Tue, Nov 11, 2008 at 03:31:18PM -0600, Christoph Lameter wrote:
> > > ksm need the pte inside the vma to point from anonymous page into filebacked
> > > page
> > > can migrate.c do it without changes?
> >
> > So change anonymous to filebacked page?
> >
> > Currently page migration assumes that the page will continue to be part
> > of the existing file or anon vma.
> >
> > What you want sounds like assigning a swap pte to an anonymous page? That
> > way a anon page gains membership in a file backed mapping.
>
> KSM needs to convert anonymous pages to PageKSM, which means a page
> owned by ksm.c and only known by ksm.c. The Linux VM will free this
> page in munmap but that's about it, all we do is to match the number
> of anon-ptes pointing to the page with the page_count. So besides
> freeing the page when the last user exit()s or cows it, the VM will do
> nothing about it. Initially. Later it can swap it in a nonlinear way.
>
Can I make a question ? (I'm working for memory cgroup.)
Now, we do charge to anonymous page when
- charge(+1) when it's mapped firstly (mapcount 0->1)
- uncharge(-1) it's fully unmapped (mapcount 1->0) vir page_remove_rmap().
My quesion is
- PageKSM pages are not necessary to be tracked by memory cgroup ?
- Can we know that "the page is just replaced and we don't necessary to do
charge/uncharge".
- annonymous page from KSM is worth to be tracked by memory cgroup ?
(IOW, it's on LRU and can be swapped-out ?)
Thanks,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists