On Tue, 14 Dec 2010 18:38:17 +0100 Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote: > > > > @@ -2491,14 +2503,14 @@ __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; > > > > Hmm, isn't it simpler to avoid batched-uncharge when page_size > PAGE_SIZE ? > > As you wish, so I'm changing it like this. > > archs where the pmd is implemented purely in software might actually > be able to use page sizes smaller than 2M that may make sense to > batch, but for now if you think this is simpler I'll go for it. We > need simple. > Thank you. Hmm,..seems not very simple :( I'm sorry. Please do as you want. -Kame > 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>