Re: [PATCH v3 1/7] Basic kernel memory functionality for the Memory Controller

From: Greg Thelen
Date: Thu Sep 22 2011 - 01:58:33 EST


On Sun, Sep 18, 2011 at 5:56 PM, Glauber Costa <glommer@xxxxxxxxxxxxx> wrote:
> @@ -270,6 +274,10 @@ struct mem_cgroup {
>         */
>        struct res_counter memsw;
>        /*
> +        * the counter to account for kmem usage.
> +        */
> +       struct res_counter kmem;
> +       /*

I don't see this charged, is this used in a later patch in this series?

> @@ -5665,3 +5754,17 @@ static int __init enable_swap_account(char *s)
>  __setup("swapaccount=", enable_swap_account);
>
>  #endif
> +
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
> +static int __init disable_kmem_account(char *s)

Minor nit. To be consistent with the other memcg __setup options, I
think this should be renamed to enable_kmem_account().

> +{
> +       /* consider enabled if no parameter or 1 is given */
> +       if (!strcmp(s, "1"))
> +               do_kmem_account = 1;
> +       else if (!strcmp(s, "0"))
> +               do_kmem_account = 0;
> +       return 1;
> +}
> +__setup("kmemaccount=", disable_kmem_account);
> +
> +#endif
--
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/