From: Glauber Costa <glommer@parallels.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Sachin Kamat <sachin.kamat@linaro.org>
Subject: Re: [PATCH v3] memcg: clean up networking headers file inclusion
Date: Fri, 14 Sep 2012 12:14:30 +0400 [thread overview]
Message-ID: <5052E766.9070304@parallels.com> (raw)
In-Reply-To: <20120914120849.GL28039@dhcp22.suse.cz>
On 09/14/2012 04:08 PM, Michal Hocko wrote:
> On Fri 14-09-12 15:35:50, Glauber Costa wrote:
> [...]
>> So, *right now* this code is used only for inet code, so I won't oppose
>> your patch on this basis. I'll reuse it for kmem, but I am happy to just
>> rebase it.
>
> Hmm, I guess I was too strict after all. memcg_init_kmem doesn't need
> CONFIG_INET gueard as both mem_cgroup_sockets_{init,destroy} are defined
> empty for !CONFIG_INET. All other functions guarded in INET&&KMEM combo
> seem to be networking specific.
> Updated patch bellow:
> ---
> From 4dca5e135b4dcc08464bbd70761d094f99ed83b1 Mon Sep 17 00:00:00 2001
> From: Michal Hocko <mhocko@suse.cz>
> Date: Tue, 11 Sep 2012 10:38:42 +0200
> Subject: [PATCH] memcg: clean up networking headers file inclusion
>
> Memory controller doesn't need anything from the networking stack unless
> CONFIG_MEMCG_KMEM is selected.
> Now we are including net/sock.h and net/tcp_memcontrol.h unconditionally
> which is not necessary. Moreover struct mem_cgroup contains tcp_mem
> even if CONFIG_MEMCG_KMEM and CONFIG_INET are not selected which is not
> necessary.
> While we are at it, let's clean up KMEM sock code ifdefs to require both
> CONFIG_KMEM and CONFIG_INET as it doesn't make much sense to compile
> this code if there is no possible user for it.
>
> Tested with
> - CONFIG_INET && CONFIG_MEMCG_KMEM
> - !CONFIG_INET && CONFIG_MEMCG_KMEM
> - CONFIG_INET && !CONFIG_MEMCG_KMEM
> - !CONFIG_INET && !CONFIG_MEMCG_KMEM
>
> Changes since V2:
> - memcg_init_kmem and kmem_cgroup_destroy don't need CONFIG_INET
>
> Changes since V1:
> - depend on both CONFIG_INET and CONFIG_MEMCG_KMEM for both
> mem_cgroup->tcp_mem and the sock specific code
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
Seems safe now. Since the config matrix can get tricky, and we have no
pressing time issues with this, I would advise to give it a day in
Fengguang's magic system before merging it. Just put it in a temp branch
in korg and let it do the job.
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-09-14 12:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 11:21 [PATCH v2] memcg: clean up networking headers file inclusion Michal Hocko
2012-09-14 11:21 ` Glauber Costa
2012-09-14 11:34 ` Michal Hocko
2012-09-14 11:35 ` Glauber Costa
2012-09-14 12:01 ` Michal Hocko
2012-09-14 8:05 ` Glauber Costa
2012-09-14 12:13 ` Michal Hocko
2012-09-14 12:08 ` [PATCH v3] " Michal Hocko
2012-09-14 8:14 ` Glauber Costa [this message]
2012-09-14 12:24 ` Michal Hocko
2012-09-14 12:41 ` Fengguang Wu
2012-09-14 12:54 ` Michal Hocko
2012-09-14 12:18 ` [PATCH] " Michal Hocko
2012-09-14 19:45 ` [PATCH v3] " Andrew Morton
2012-09-17 12:02 ` [PATCH v4] memcg: cleanup kmem tcp ifdefs Michal Hocko
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=5052E766.9070304@parallels.com \
--to=glommer@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=sachin.kamat@linaro.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.