lkml.org 
[lkml]   [2012]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH -V3 4/8] memcg: track resource index in cftype private
    Date
    On Tue, 13 Mar 2012 17:34:08 +0400, Glauber Costa <glommer@parallels.com> wrote:
    > On 03/13/2012 11:07 AM, Aneesh Kumar K.V wrote:
    > > if (type == _MEM)
    > > ret = mem_cgroup_resize_limit(memcg, val);
    > > - else
    > > + else if (type == _MEMHUGETLB) {
    > > + int idx = MEMFILE_IDX(cft->private);
    > > + ret = res_counter_set_limit(&memcg->hugepage[idx], val);
    > > + } else
    > > ret = mem_cgroup_resize_memsw_limit(memcg, val);
    > > break;
    > > case RES_SOFT_LIMIT:
    >
    > What if a user try to set limit < usage ? Isn't there any reclaim that
    > we could possibly do, like it is done by normal memcg ?

    No, HugeTLB doesn't support reclaim. If we set the limit to a value
    below current usage, future allocations will fail, but we don't reclaim.


    -aneesh



    \
     
     \ /
      Last update: 2012-03-14 11:51    [W:5.337 / U:0.284 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site