Thread (26 messages) 26 messages, 8 authors, 2011-12-23

Re: [PATCH v9 1/9] Basic kernel memory functionality for the Memory Controller

From: Greg Thelen <hidden>
Date: 2011-12-16 06:21:16
Also in: linux-mm, lkml, netdev

On Sun, Dec 11, 2011 at 11:47 PM, Glauber Costa [off-list ref] wrote:
+Memory limits as specified by the standard Memory Controller may or may not
+take kernel memory into consideration. This is achieved through the file
+memory.independent_kmem_limit. A Value different than 0 will allow for kernel
s/Value/value/

It is probably worth documenting the default value for
memory.independent_kmem_limit?  I figure it would be zero at root and
and inherited from parents.  But I think the implementation differs.
quoted hunk ↗ jump to hunk
@@ -277,6 +281,11 @@ struct mem_cgroup {
        */
       unsigned long   move_charge_at_immigrate;
       /*
+        * Should kernel memory limits be stabilished independently
+        * from user memory ?
+        */
+       int             kmem_independent_accounting;
I have no serious objection, but a full int seems like overkill for a
boolean value.
+static int register_kmem_files(struct cgroup *cont, struct cgroup_subsys *ss)
+{
+       int ret = 0;
+
+       ret = cgroup_add_files(cont, ss, kmem_cgroup_files,
+                              ARRAY_SIZE(kmem_cgroup_files));
+       return ret;
If you want to this function could be condensed down to:
  return cgroup_add_files(...);
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help