On Tue, 13 Mar 2012 17:34:08 +0400, Glauber Costa <glommer@xxxxxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html