Thread (26 messages) 26 messages, 6 authors, 2011-09-12

Re: [PATCH v2 2/9] Kernel Memory cgroup

flat view

From: Glauber Costa <hidden>
Date: 2011-09-07 05:56:38
Also in: lkml, netdev

On 09/07/2011 02:24 AM, Paul Menage wrote:
On Tue, Sep 6, 2011 at 9:23 PM, Glauber Costa[off-list ref]  wrote:
quoted
+
+struct kmem_cgroup {
+       struct cgroup_subsys_state css;
+       struct kmem_cgroup *parent;
+};
There's a parent pointer in css.cgroup, so you shouldn't need a
separate one here.
Ok, I missed that. Thanks
Most cgroup subsystems define this structure (and the below accessor
functions) in their .c file rather than exposing it to the world? Does
this subsystem particularly need it exposed?
Originally I was using it in sock.c and friends. Now, from the last submission to this one, most of those uses were substituted. The acessors, however, are in kmem_cgroup.h. Reason being I want most of them to be inline.
quoted
+
+static struct cgroup_subsys_state *kmem_create(
+       struct cgroup_subsys *ss, struct cgroup *cgrp)
+{
+       struct kmem_cgroup *sk = kzalloc(sizeof(*sk), GFP_KERNEL);
kcg or just cg would be a better name?
I'll go with kcg.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help