From: Andrew Morton <akpm@linux-foundation.org>
To: Bob Liu <lliubbo@gmail.com>
Cc: linux-mm@kvack.org, kamezawa.hiroyu@jp.fujitsu.com,
mhocko@suse.cz, hannes@cmpxchg.org, rientjes@google.com,
kosaki.motohiro@jp.fujitsu.com, bsingharora@gmail.com
Subject: Re: [RFC][PATCH] memcg: malloc memory for possible node in hotplug
Date: Tue, 20 Dec 2011 15:11:13 -0800 [thread overview]
Message-ID: <20111220151113.8aa05166.akpm@linux-foundation.org> (raw)
In-Reply-To: <1324375503-31487-1-git-send-email-lliubbo@gmail.com>
On Tue, 20 Dec 2011 18:05:03 +0800
Bob Liu <lliubbo@gmail.com> wrote:
> Current struct mem_cgroup_per_node and struct mem_cgroup_tree_per_node are
> malloced for all possible node during system boot.
>
> This may cause some memory waste, better if move it to memory hotplug.
This adds a fair bit of complexity for what I suspect is a pretty small
memory saving. And that memory saving will be on pretty large machines.
Can you please estimate how much memory this change will save? Taht
way we can decide whether the additional complexity is worthwhile.
Also, the operations in the new memcg_mem_hotplug_callback() are
copied-n-pasted from other places in memcontrol.c, such as from
mem_cgroup_soft_limit_tree_init(). We shouldn't do this - we should be
able to factor the code so that both mem_cgroup_create() and
memcg_mem_hotplug_callback() emit simple calls to common helper
functions.
Thirdly, please don't forget to run scripts/checkpatch.pl!
--
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>
next prev parent reply other threads:[~2011-12-20 23:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 10:05 [RFC][PATCH] memcg: malloc memory for possible node in hotplug Bob Liu
2011-12-20 23:11 ` Andrew Morton [this message]
2011-12-21 1:00 ` Bob Liu
2011-12-21 0:24 ` KAMEZAWA Hiroyuki
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=20111220151113.8aa05166.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lliubbo@gmail.com \
--cc=mhocko@suse.cz \
--cc=rientjes@google.com \
/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;
as well as URLs for NNTP newsgroup(s).