How to calculate available memory for mem_cgroup.

mem_cgroup is checking available amount of memory the group can charge by calling the below function. /** * mem_cgroup_margin – calculate chargeable space of a memory cgroup * @memcg: the memory cgroup * * Returns the maximum amount of memory @mem can be charged with, in * pages. */ static unsigned long mem_cgroup_margin(struct mem_cgroup *memcg)Continue reading “How to calculate available memory for mem_cgroup.”