Re: [PATCH v3 1/6] memcg: fix error code in hugetlb_force_memcg_empty()
From: KAMEZAWA Hiroyuki <hidden>
Date: 2012-05-14 01:09:35
Also in:
linux-mm, lkml
From: KAMEZAWA Hiroyuki <hidden>
Date: 2012-05-14 01:09:35
Also in:
linux-mm, lkml
(2012/05/12 6:17), Andrew Morton wrote:
On Fri, 11 May 2012 18:45:18 +0900 KAMEZAWA Hiroyuki [off-list ref] wrote:quoted
The conditions are handled as -EBUSY, _now_.The changelog is poor. I rewrote it to : hugetlb_force_memcg_empty() incorrectly returns 0 (success) when the : cgroup is found to be busy. Return -EBUSY instead. But it still doesn't tell us the end-user-visible effects of the bug. It should.
Ah, sorry. How about this ? The force_empty interface allows to make the memcg only when the cgroup doesn't include any tasks. # echo 0 > /cgroup/xxxx/memory.force_empty If cgroup isn't empty, force_empty does nothing and retruns -EBUSY in usual memcg, memcontrol.c. But hugetlb implementation has inconsitency with it and returns 0 and do nothing. Fix it to return -EBUSY. Thanks, -Kame