OpenVZ Forum


Home » Mailing lists » Devel » [RFC}[PATCH] forced uncharge for successful rmdir.
Re: [RFC}[PATCH] forced uncharge for successful rmdir. [message #20906 is a reply to message #20869] Thu, 27 September 2007 16:53 Go to previous messageGo to previous message
Badari Pulavarty is currently offline  Badari Pulavarty
Messages: 15
Registered: September 2006
Junior Member
On Thu, 2007-09-27 at 16:30 +0900, KAMEZAWA Hiroyuki wrote:
> Following patch is for successful rmdir in memory cgroup.
> 
> Currently, rmdir against memory cgroup will fail if charged page caches are in cgroup.
> (even if no tasks in cgroup.)
> 
> I don't like this. This patch implements "forced" uncharge against memory cgroup.
> Uncharged pages will be charged again when some other cgroup/task accesses it.
> 
> I wonder that all unmapped page-caches in cgroup should be uncharged if "1" is written to
> control_type.
> 
> I'm grad if I can hear memory controller's policy about "rmdir" against no-task-cgroup.

Works for me..

elm3b155:/dev/cgroup/xxx # cat tasks
elm3b155:/dev/cgroup/xxx #
elm3b155:/dev/cgroup/xxx # cat memory.usage_in_bytes
16384
elm3b155:/dev/cgroup/xxx # echo -n 0 > memory.control_type
elm3b155:/dev/cgroup/xxx # cat memory.usage_in_bytes
0

Thanks,
Badari



_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 00/29] Rename Containers to Control Groups
Next Topic: [RFC][PATCH 0/2] New API to change the IDs of an existing IPC
Goto Forum:
  


Current Time: Thu Aug 21 09:40:22 GMT 2025

Total time taken to generate the page: 0.05712 seconds