linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Lai Jiangshan <laijs@cn.fujitsu.com>,
	Wen Congyang <wency@cn.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	x86 maintainers <x86@kernel.org>,
	Jiang Liu <jiang.liu@huawei.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Yinghai Lu <yinghai@kernel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Balbir Singh <bsingharora@gmail.com>, Tejun Heo <tj@kernel.org>,
	Li Zefan <lizefan@huawei.com>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	containers@lists.linux-foundation.org,
	Christoph Lameter <cl@linux.com>, Hillf Danton <dhillf@gmail.com>
Subject: Re: [V5 PATCH 08/26] memcontrol: use N_MEMORY instead N_HIGH_MEMORY
Date: Wed, 31 Oct 2012 14:18:10 +0100	[thread overview]
Message-ID: <20121031131810.GA27381@dhcp22.suse.cz> (raw)
In-Reply-To: <5090CD48.30604@cn.fujitsu.com> <1351524078-20363-7-git-send-email-laijs@cn.fujitsu.com>

On Wed 31-10-12 15:03:36, Wen Congyang wrote:
> At 10/30/2012 04:46 AM, David Rientjes Wrote:
> > On Mon, 29 Oct 2012, Lai Jiangshan wrote:
[...]
> >> In one word, we need a N_MEMORY. We just intrude it as an alias to
> >> N_HIGH_MEMORY and fix all im-proper usages of N_HIGH_MEMORY in late patches.
> >>
> > 
> > If this is really that problematic (and it appears it's not given that 
> > there are many use cases of it and people tend to get it right), then why 
> > not simply rename N_HIGH_MEMORY instead of introducing yet another 
> > nodemask to the equation?
> 
> The reason is that we need a node which only contains movable memory. This
> feature is very important for node hotplug. So we will add a new nodemask
> for movable memory. N_MEMORY contains movable memory but N_HIGH_MEMORY
> doesn't contain it.

OK, so the N_MOVABLE_MEMORY (or how you will call it) requires that all
the allocations will be migrateable?
How do you want to achieve that with the page_cgroup descriptors? (see
bellow)

On Mon 29-10-12 23:20:58, Lai Jiangshan wrote:
[...]
> diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
> index 5ddad0c..c1054ad 100644
> --- a/mm/page_cgroup.c
> +++ b/mm/page_cgroup.c
> @@ -271,7 +271,7 @@ void __init page_cgroup_init(void)
>  	if (mem_cgroup_disabled())
>  		return;
>  
> -	for_each_node_state(nid, N_HIGH_MEMORY) {
> +	for_each_node_state(nid, N_MEMORY) {
>  		unsigned long start_pfn, end_pfn;
>  
>  		start_pfn = node_start_pfn(nid);

This will call init_section_page_cgroup(pfn, nid) later which allocates
page_cgroup descriptors which are not movable. Or is there any code in
your patchset that handles this?
-- 
Michal Hocko
SUSE Labs

--
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>

  parent reply	other threads:[~2012-10-31 13:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1351523301-20048-1-git-send-email-laijs@cn.fujitsu.com>
2012-10-29 15:20 ` [V5 PATCH 02/26] memory_hotplug: handle empty zone when online_movable/online_kernel Lai Jiangshan
2012-10-29 15:20 ` [V5 PATCH 03/26] memory_hotplug: ensure every online node has NORMAL memory Lai Jiangshan
2012-10-29 15:20 ` [V5 PATCH 08/26] memcontrol: use N_MEMORY instead N_HIGH_MEMORY Lai Jiangshan
2012-10-29 16:22   ` Michal Hocko
2012-10-29 20:40     ` David Rientjes
2012-10-29 20:58       ` Michal Hocko
2012-10-29 21:08         ` David Rientjes
2012-10-29 21:34           ` Michal Hocko
2012-10-31 13:18   ` Michal Hocko [this message]
2012-10-29 15:20 ` [V5 PATCH 09/26] oom: " Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 10/26] mm,migrate: " Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 11/26] mempolicy: " Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 12/26] hugetlb: " Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 13/26] vmstat: " Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 16/26] vmscan: " Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 17/26] page_alloc: use N_MEMORY instead N_HIGH_MEMORY change the node_states initialization Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 18/26] hotplug: update nodemasks management Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 19/26] numa: add CONFIG_MOVABLE_NODE for movable-dedicated node Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 20/26] memory_hotplug: allow online/offline memory to result movable node Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 21/26] page_alloc: add kernelcore_max_addr Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 24/26] memblock: limit memory address from memblock Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 25/26] memblock: compare current_limit with end variable at memblock_find_in_range_node() Lai Jiangshan
2012-10-29 15:21 ` [V5 PATCH 26/26] mempolicy: fix is_valid_nodemask() Lai Jiangshan

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=20121031131810.GA27381@dhcp22.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=bsingharora@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=cl@linux.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dhillf@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=jiang.liu@huawei.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan@huawei.com \
    --cc=mgorman@suse.de \
    --cc=rientjes@google.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tj@kernel.org \
    --cc=wency@cn.fujitsu.com \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.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 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).