Messages in this thread | | | Date | Mon, 24 Jan 2011 19:03:59 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | Re: [PATCH 3/7] memcg : fix mem_cgroup_check_under_limit |
| |
On Mon, 24 Jan 2011 11:04:34 +0100 Johannes Weiner <hannes@cmpxchg.org> wrote:
> > ret = mem_cgroup_hierarchical_reclaim(mem_over_limit, NULL, > > - gfp_mask, flags); > > + gfp_mask, flags, csize); > > /* > > * try_to_free_mem_cgroup_pages() might not give us a full > > * picture of reclaim. Some pages are reclaimed and might be > > @@ -1852,7 +1853,7 @@ static int __mem_cgroup_do_charge(struct > > * Check the limit again to see if the reclaim reduced the > > * current usage of the cgroup before giving up > > */ > > - if (ret || mem_cgroup_check_under_limit(mem_over_limit)) > > + if (ret || mem_cgroup_check_under_limit(mem_over_limit, csize)) > > return CHARGE_RETRY; > > This is the only site that is really involved with THP.
yes.
> But you need to touch every site because you change mem_cgroup_check_under_limit() > instead of adding a new function. > Yes.
> I would suggest just adding another function for checking available > space explicitely and only changing this single call site to use it. > > Just ignore the return value of mem_cgroup_hierarchical_reclaim() and > check for enough space unconditionally. > > Everybody else is happy with PAGE_SIZE pages. > Hmm. ok, let us changes to be small and see how often hugepage alloc will fail.
Thanks, -Kame
| |