Re: [PATCH v3 1/6] memcg: fix error code in hugetlb_force_memcg_empty()
From: KAMEZAWA Hiroyuki
Date: Sun May 13 2012 - 21:09:30 EST
(2012/05/12 6:17), Andrew Morton wrote:
> On Fri, 11 May 2012 18:45:18 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
>> 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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/