Re: memcg Can't context between v1 and v2 because css->refcnt not released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



at first ,thanks for your reply.
but i also tested what you said, the problem is also.
force_empty only call try_to_free_pages, not all the pages remove
because mem_cgroup_reparent_charges moved
#cd /sys/fs/cgroup/memory
#mkdir a
#echo 0 > a/cgroup.procs
#sleep 1
#echo 0 > a/cgroup.procs
#echo 1 > a/memory.force_empty
#rmdir a
#cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
memory 2 2 1
the num_cgroups also not released





2017-08-10 15:10 GMT+08:00 Michal Hocko <mhocko@xxxxxxxxxx>:
> On Wed 09-08-17 15:06:34, wang Yu wrote:
>> Hello Johannes ,Michal,and Tejun:
>>
>>   i using memcg v1,  but some reason  i want to context to  memcg v2,
>> but i can't, here is my step:
>> #cat /proc/cgroups
>> #subsys_name hierarchy num_cgroups enabled
>>  memory 5 1 1
>> #cd /sys/fs/cgroup/memory
>> #mkdir a
>> #echo 0 > a/cgroup.procs
>> #sleep 1
>> #echo 0 > cgroup.procs
>
> This doesn't do what you think. It will try to add a non-existant pid 0
> to the root cgroup. You need to remove cgroup a. Moreover it is possible
> that the `sleep' command will fault some page cache and that will stay
> in memcg `a' until there is a memory pressure. cgroup v1 had
> force_empty knob which you can use to drain the cgroup before removal.
> Then you should be able to umount the v1 cgroup and mount v2.
> --
> Michal Hocko
> SUSE Labs
--
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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux