lkml.org 
[lkml]   [2011]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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





\
 
 \ /
  Last update: 2011-01-24 11:13    [W:0.071 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site