All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
To: Christoph Lameter <cl@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: 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: [PATCH] Make CONFIG_MIGRATION available for s390
Date: Mon, 07 Jul 2008 20:25:48 +0200	[thread overview]
Message-ID: <1215455148.8431.108.camel@localhost.localdomain> (raw)
In-Reply-To: <48725480.1060808@linux-foundation.org>

On Mon, 2008-07-07 at 12:38 -0500, Christoph Lameter wrote:
> How does the compile break? It may be better to fix this where the function
> is used.

Good point, I did not look into this deep enough and tried to fix the
symptoms instead of the cause. There are two locations where the compile
breaks:
- mm/migrate.c: migrate_vmas() does not know vm_ops->migrate()
- inlcude/linux/migrate.h: vma_migratable() does not know policy_zone

Both functions are called from mm/mempolicy.c, which is NUMA-only.
vma_migratable() is also called from mm/migrate.c, but just inside a
'#ifdef CONFIG_NUMA' section. So I think it should be safe to just put
the definition of those two functions within '#ifdef CONFIG_NUMA',
and the compile error will be gone, see new patch below.

Thanks,
Gerald
---

Subject: [PATCH] Make CONFIG_MIGRATION available for s390

From: Gerald Schaefer <gerald.schaefer@de.ibm.com>

We'd like to support CONFIG_MEMORY_HOTREMOVE on s390, which depends on
CONFIG_MIGRATION. So far, CONFIG_MIGRATION is only available with NUMA
support.

This patch makes CONFIG_MIGRATION selectable for architectures that define
ARCH_ENABLE_MEMORY_HOTREMOVE. When MIGRATION is enabled w/o NUMA, the kernel
won't compile because migrate_vmas() does not know about vm_ops->migrate()
and vma_migratable() does not know about policy_zone. To avoid this, those
two functions can be restricted to "#ifdef CONFIG_NUMA" because they are
not being used w/o NUMA.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
---

 include/linux/migrate.h |    2 ++
 mm/Kconfig              |    2 +-
 mm/migrate.c            |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

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
Index: linux-2.6/include/linux/migrate.h
===================================================================
--- linux-2.6.orig/include/linux/migrate.h
+++ linux-2.6/include/linux/migrate.h
@@ -8,6 +8,7 @@
 typedef struct page *new_page_t(struct page *, unsigned long private, int **);
 
 #ifdef CONFIG_MIGRATION
+#ifdef CONFIG_NUMA
 /* Check if a vma is migratable */
 static inline int vma_migratable(struct vm_area_struct *vma)
 {
@@ -24,6 +25,7 @@ static inline int vma_migratable(struct 
 			return 0;
 	return 1;
 }
+#endif /* CONFIG_NUMA */
 
 extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
 extern int putback_lru_pages(struct list_head *l);
Index: linux-2.6/mm/migrate.c
===================================================================
--- linux-2.6.orig/mm/migrate.c
+++ linux-2.6/mm/migrate.c
@@ -1070,7 +1070,6 @@ out2:
 	mmput(mm);
 	return err;
 }
-#endif
 
 /*
  * Call migration functions in the vma_ops that may prepare
@@ -1092,3 +1091,4 @@ int migrate_vmas(struct mm_struct *mm, c
  	}
  	return err;
 }
+#endif



WARNING: multiple messages have this Message-ID (diff)
From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
To: Christoph Lameter <cl@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: 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: [PATCH] Make CONFIG_MIGRATION available for s390
Date: Mon, 07 Jul 2008 20:25:48 +0200	[thread overview]
Message-ID: <1215455148.8431.108.camel@localhost.localdomain> (raw)
In-Reply-To: <48725480.1060808@linux-foundation.org>

On Mon, 2008-07-07 at 12:38 -0500, Christoph Lameter wrote:
> How does the compile break? It may be better to fix this where the function
> is used.

Good point, I did not look into this deep enough and tried to fix the
symptoms instead of the cause. There are two locations where the compile
breaks:
- mm/migrate.c: migrate_vmas() does not know vm_ops->migrate()
- inlcude/linux/migrate.h: vma_migratable() does not know policy_zone

Both functions are called from mm/mempolicy.c, which is NUMA-only.
vma_migratable() is also called from mm/migrate.c, but just inside a
'#ifdef CONFIG_NUMA' section. So I think it should be safe to just put
the definition of those two functions within '#ifdef CONFIG_NUMA',
and the compile error will be gone, see new patch below.

Thanks,
Gerald
---

Subject: [PATCH] Make CONFIG_MIGRATION available for s390

From: Gerald Schaefer <gerald.schaefer@de.ibm.com>

We'd like to support CONFIG_MEMORY_HOTREMOVE on s390, which depends on
CONFIG_MIGRATION. So far, CONFIG_MIGRATION is only available with NUMA
support.

This patch makes CONFIG_MIGRATION selectable for architectures that define
ARCH_ENABLE_MEMORY_HOTREMOVE. When MIGRATION is enabled w/o NUMA, the kernel
won't compile because migrate_vmas() does not know about vm_ops->migrate()
and vma_migratable() does not know about policy_zone. To avoid this, those
two functions can be restricted to "#ifdef CONFIG_NUMA" because they are
not being used w/o NUMA.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
---

 include/linux/migrate.h |    2 ++
 mm/Kconfig              |    2 +-
 mm/migrate.c            |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

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
Index: linux-2.6/include/linux/migrate.h
===================================================================
--- linux-2.6.orig/include/linux/migrate.h
+++ linux-2.6/include/linux/migrate.h
@@ -8,6 +8,7 @@
 typedef struct page *new_page_t(struct page *, unsigned long private, int **);
 
 #ifdef CONFIG_MIGRATION
+#ifdef CONFIG_NUMA
 /* Check if a vma is migratable */
 static inline int vma_migratable(struct vm_area_struct *vma)
 {
@@ -24,6 +25,7 @@ static inline int vma_migratable(struct 
 			return 0;
 	return 1;
 }
+#endif /* CONFIG_NUMA */
 
 extern int isolate_lru_page(struct page *p, struct list_head *pagelist);
 extern int putback_lru_pages(struct list_head *l);
Index: linux-2.6/mm/migrate.c
===================================================================
--- linux-2.6.orig/mm/migrate.c
+++ linux-2.6/mm/migrate.c
@@ -1070,7 +1070,6 @@ out2:
 	mmput(mm);
 	return err;
 }
-#endif
 
 /*
  * Call migration functions in the vma_ops that may prepare
@@ -1092,3 +1091,4 @@ int migrate_vmas(struct mm_struct *mm, c
  	}
  	return err;
 }
+#endif


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

  reply	other threads:[~2008-07-07 18:26 UTC|newest]

Thread overview: 37+ 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-06 14:35 ` [PATCH] Make CONFIG_MIGRATION available for s390, " Gerald Schaefer
2008-07-07  6:22 ` Yasunori Goto
2008-07-07  6:22   ` Yasunori Goto
2008-07-07  9:16 ` Andy Whitcroft
2008-07-07  9:16   ` Andy Whitcroft
2008-07-07 10:24   ` Yasunori Goto
2008-07-07 10:24     ` Yasunori Goto
2008-07-07 16:41     ` Gerald Schaefer
2008-07-07 16:41       ` Gerald Schaefer
2008-07-07 16:53       ` Christoph Lameter
2008-07-07 16:53         ` Christoph Lameter
2008-07-07 15:09 ` Christoph Lameter
2008-07-07 15:09   ` Christoph Lameter
2008-07-07 17:28   ` Gerald Schaefer
2008-07-07 17:28     ` Gerald Schaefer
2008-07-07 17:38     ` Christoph Lameter
2008-07-07 17:38       ` Christoph Lameter
2008-07-07 18:25       ` Gerald Schaefer [this message]
2008-07-07 18:25         ` Gerald Schaefer
2008-07-07 18:32         ` Christoph Lameter
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 10:50             ` Gerald Schaefer
2008-07-08 13:35             ` Christoph Lameter
2008-07-08 13:35               ` Christoph Lameter
2008-07-08 13:47               ` Christoph Lameter
2008-07-08 13:47                 ` Christoph Lameter
2008-07-11 13:05               ` Gerald Schaefer
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 Gerald Schaefer
2008-07-05  4:02 ` KAMEZAWA Hiroyuki
2008-07-05  4:02   ` KAMEZAWA Hiroyuki
2008-07-05  6:14   ` Yasunori Goto
2008-07-05  6:14     ` Yasunori Goto
2008-07-06 14:30     ` Gerald Schaefer
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=1215455148.8431.108.camel@localhost.localdomain \
    --to=gerald.schaefer@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=cl@linux-foundation.org \
    --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 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.