linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux-foundation.org>
To: gerald.schaefer@de.ibm.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Yasunori Goto <y-goto@jp.fujitsu.com>,
	Dave Hansen <haveblue@us.ibm.com>,
	Andy Whitcroft <apw@shadowen.org>
Subject: Re: [PATCH] Make CONFIG_MIGRATION available for s390
Date: Mon, 07 Jul 2008 10:09:15 -0500	[thread overview]
Message-ID: <4872319B.9040809@linux-foundation.org> (raw)
In-Reply-To: <1215354957.9842.19.camel@localhost.localdomain>

Gerald Schaefer wrote:

> Index: linux-2.6/include/linux/migrate.h
> ===================================================================
> --- linux-2.6.orig/include/linux/migrate.h
> +++ linux-2.6/include/linux/migrate.h
> @@ -13,6 +13,7 @@ static inline int vma_migratable(struct 
>  {
>  	if (vma->vm_flags & (VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED))
>  		return 0;
> +#ifdef CONFIG_NUMA
>  	/*
>  	 * Migration allocates pages in the highest zone. If we cannot
>  	 * do so then migration (at least from node to node) is not
> @@ -22,6 +23,7 @@ static inline int vma_migratable(struct 
>  		gfp_zone(mapping_gfp_mask(vma->vm_file->f_mapping))
>  								< policy_zone)
>  			return 0;
> +#endif
>  	return 1;
>  }

This will extend the number of pages that are migratable and lead to strange
semantics in the NUMA case. There suddenly vma_is migratable will forbid hotplug
to migrate certain pages. 

I think we need two functions:

vma_migratable()	General migratability

vma_policy_migratable()	Migratable under NUMA policies.


> Index: linux-2.6/include/linux/mm.h
> ===================================================================
> --- linux-2.6.orig/include/linux/mm.h
> +++ linux-2.6/include/linux/mm.h
> @@ -193,6 +193,8 @@ struct vm_operations_struct {
>  	 */
>  	struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
>  					unsigned long addr);
> +#endif
> +#ifdef CONFIG_MIGRATION
>  	int (*migrate)(struct vm_area_struct *vma, const nodemask_t *from,
>  		const nodemask_t *to, unsigned long flags);
>  #endif

That wont work since the migrate function takes a nodemask! The point of
the function is to move memory from node to node which is something that you
*cannot* do in a non NUMA configuration. So leave this chunk out.


> Index: linux-2.6/mm/Kconfig
> ===================================================================
> --- linux-2.6.orig/mm/Kconfig
> +++ linux-2.6/mm/Kconfig
> @@ -174,7 +174,7 @@ config SPLIT_PTLOCK_CPUS
>  config MIGRATION
>  	bool "Page migration"
>  	def_bool y
> -	depends on NUMA
> +	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE
>  	help
>  	  Allows the migration of the physical location of pages of processes
>  	  while the virtual addresses are not changed. This is useful for

Hmmm... Okay. I tried to make MIGRATION as independent of CONFIG_NUMA as possible so hopefully this will work.



--
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:[~2008-07-07 15:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-06 14:35 [PATCH] Make CONFIG_MIGRATION available for s390, " Gerald Schaefer
2008-07-07  6:22 ` Yasunori Goto
2008-07-07  9:16 ` Andy Whitcroft
2008-07-07 10:24   ` Yasunori Goto
2008-07-07 16:41     ` Gerald Schaefer
2008-07-07 16:53       ` Christoph Lameter
2008-07-07 15:09 ` Christoph Lameter [this message]
2008-07-07 17:28   ` Gerald Schaefer
2008-07-07 17:38     ` Christoph Lameter
2008-07-07 18:25       ` Gerald Schaefer
2008-07-07 18:32         ` Christoph Lameter
2008-07-08 10:50           ` [PATCH] Make CONFIG_MIGRATION available w/o NUMA Gerald Schaefer
2008-07-08 13:35             ` Christoph Lameter
2008-07-08 13:47               ` Christoph Lameter
2008-07-11 13:05               ` Gerald Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2008-07-04 14:58 [PATCH] Make CONFIG_MIGRATION available for s390, [PATCH] Make CONFIG_MIGRATION available for s390 Gerald Schaefer
2008-07-05  4:02 ` KAMEZAWA Hiroyuki
2008-07-05  6:14   ` Yasunori Goto
2008-07-06 14:30     ` Gerald Schaefer

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=4872319B.9040809@linux-foundation.org \
    --to=cl@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=haveblue@us.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=y-goto@jp.fujitsu.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