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

From: Paul Menage
Date: Wed Sep 07 2011 - 01:24:36 EST


On Tue, Sep 6, 2011 at 9:23 PM, Glauber Costa <glommer@xxxxxxxxxxxxx> wrote:
> +
> +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.

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?

> +
> +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?

Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/