Re: [RFC][PATCH] memcg: malloc memory for possible node in hotplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Dec 2011 18:05:03 +0800
Bob Liu <lliubbo@xxxxxxxxx> 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@xxxxxxxxx.  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]