From: "Paul Menage" <menage@google.com>
To: "Pekka J Enberg" <penberg@cs.helsinki.fi>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
balbir@linux.vnet.ibm.com
Subject: Re: [PATCH] cgroups: don't depend on CONFIG_MM_OWNER
Date: Mon, 15 Sep 2008 10:55:45 -0700 [thread overview]
Message-ID: <6599ad830809151055v10191becl2f528fa006902b40@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0809142037070.30252@melkki.cs.Helsinki.FI>
On Sun, Sep 14, 2008 at 10:37 AM, Pekka J Enberg <penberg@cs.helsinki.fi> wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
>
> The revoke patches, for example, select CONFIG_MM_OWNER independently of
> cgroups. Therefore, don't depend on CONFIG_MM_OWNER in cgroup specific code.
Yes, the existing code doesn't seem quite right - if !CONFIG_MM_OWNER
then we don't need to even define a trivial version of
cgroup_mm_owner_callbacks()
But your patch is too specific - tying the existance of
cgroup_mm_owner_callbacks() to the memory controller would break other
controllers (e.g. the memrlimit or swap controllers, which also want
to use it)
How about:
- any cgroup that needs mm-owner callbacks selects an option
CGROUP_MM_OWNER_CALLBACK
- CGROUP_MM_OWNER_CALLBACK selects MM_OWNER and triggers the
definition of a non-trivial cgroup_mm_owner_callbacks() function
Paul
>
> Cc: Paul Menage <menage@google.com>
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
> include/linux/cgroup.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
> index c98dd7c..e270ec3 100644
> --- a/include/linux/cgroup.h
> +++ b/include/linux/cgroup.h
> @@ -413,10 +413,10 @@ static inline int cgroupstats_build(struct cgroupstats *stats,
>
> #endif /* !CONFIG_CGROUPS */
>
> -#ifdef CONFIG_MM_OWNER
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR
> extern void
> cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new);
> -#else /* !CONFIG_MM_OWNER */
> +#else /* !CONFIG_CGROUP_MEM_RES_CTLR */
> static inline void
> cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new)
> {
> --
> 1.5.4.3
>
>
next prev parent reply other threads:[~2008-09-15 17:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-14 17:37 Pekka J Enberg
2008-09-15 17:55 ` Paul Menage [this message]
2008-09-15 17:56 ` Pekka Enberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6599ad830809151055v10191becl2f528fa006902b40@mail.gmail.com \
--to=menage@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®