Re: [PATCH 36 of 66] memcg compound

From: Andrea Arcangeli
Date: Wed Dec 15 2010 - 00:30:45 EST


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);
> >
> >
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/