Re: RFC: Transparent Hugepage support

From: KAMEZAWA Hiroyuki
Date: Tue Nov 03 2009 - 19:39:42 EST

On Tue, 3 Nov 2009 11:55:43 +0100
Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote:

> On Fri, Oct 30, 2009 at 09:40:37AM +0900, KAMEZAWA Hiroyuki wrote:
> > Ah, please keep CONFIG_TRANSPARENT_HUGEPAGE for a while.
> > Now, memcg don't handle hugetlbfs because it's special and cannot be freed by
> > the kernel, only users can free it. But this new transparent-hugepage seems to
> > be designed as that the kernel can free it for memory reclaiming.
> > So, I'd like to handle this in memcg transparently.
> >
> > But it seems I need several changes to support this new rule.
> > I'm glad if this new huge page depends on !CONFIG_CGROUP_MEM_RES_CTRL for a
> > while.
> Yeah the accounting (not just memcg) should be checked.. I didn't pay
> too much attention to stats at this point.
> But we want to fix it fast instead of making the two options mutually
> exclusive.. Where are the pages de-accounted when they are freed?

It's de-accounted at page_remove_rmap() in typical case of Anon.
But swap-cache/bacthed-uncarhge related part is complicated, maybe.
...because of me ;(

Okay, I don't request !CONFIG_CGROUP_MEM_RES_CTRL, I'm glad if you CC me.

> Accounting seems to require just two one liners
> calling mem_cgroup_newpage_charge.
Yes, maybe so.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at