Re: [PATCH 36 of 66] memcg compound

Andrea Arcangeli
2010-12-15T05:30:33Z

Hello,

On Wed, Dec 15, 2010 at 09:12:09AM +0900, KAMEZAWA Hiroyuki wrote:
> Thank you. Hmm,..seems not very simple :( I'm sorry.
> Please do as you want.

I did the below change, let me know if there's any problem with it.

What's left is mem_cgroup_move_parent...

> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -2503,6 +2503,9 @@ __do_uncharge(struct mem_cgroup *mem, co
> > if (!batch->do_batch || test_thread_flag(TIF_MEMDIE))
> > goto direct_uncharge;
> >
> > + if (page_size != PAGE_SIZE)
> > + goto direct_uncharge;
> > +
> > /*
> > * In typical case, batch->memcg == mem. This means we can
> > * merge a series of uncharges to an uncharge of res_counter.
> > @@ -2511,9 +2514,9 @@ __do_uncharge(struct mem_cgroup *mem, co
> > if (batch->memcg != mem)
> > goto direct_uncharge;
> > /* remember freed charge and uncharge it later */
> > - batch->bytes += page_size;
> > + batch->bytes += PAGE_SIZE;
> > if (uncharge_memsw)
> > - batch->memsw_bytes += page_size;
> > + batch->memsw_bytes += PAGE_SIZE;
> > return;
> > direct_uncharge:
> > res_counter_uncharge(&mem->res, page_size);
> >
> >
>