Skip to contentSkip to conversation

mm/Kconfig: add MMU dependency for MIGRATION.

PATCH Superseded Chen Gang 3 participants 8 messages Aug 1, 2013 – Aug 6, 2013

Subsystems (2)
lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 mm/Kconfig: add MMU dependency for MIGRATION.

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +2 -2
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help
Signature · 7 lines
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw
Quoted 35 lines · Chen Gang

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +1 -1
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in

mm/Kconfig config MEM_SOFT_DIRTY · line 525

Quoted 5 lines
mm/Kconfig +1 -1
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU

Why CMA has to depend on MMU as well? The MIGRATION part should be sufficient.

Quoted 3 lines
mm/Kconfig +0 -0
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#2 lore raw
Quoted 37 lines · Michal Hocko
Quoted 36 lines · Chen Gang

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +1 -1
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
Quoted 8 lines

mm/Kconfig config MEM_SOFT_DIRTY · line 525

Quoted 4 lines
mm/Kconfig +1 -1
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU

Why CMA has to depend on MMU as well? The MIGRATION part should be sufficient.

MIGRATION need depend on MMU, when NOMMU, if select CMA, it will select MIGRATION by force.

e.g. for allmodconfig with sh architecture, if we only let MIGRATION depend on MMU, not let CMA depend on MMU, it will report the warning below:

scripts/kconfig/conf --allmodconfig Kconfig
warning: (COMPACTION && CMA) selects MIGRATION which has unmet direct dependencies ((NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU)

And for the final config file, MIGRATION is still enabled, although MMU is not defined.

Quoted 4 lines

mm/Kconfig config MEM_SOFT_DIRTY · line 528

Quoted 3 lines
mm/Kconfig +0 -0
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help

Thanks.

Signature · 7 lines
Chen Gang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#3 lore raw
Quoted 47 lines · Chen Gang F T
Quoted 37 lines · Michal Hocko
Quoted 36 lines · Chen Gang

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +1 -1
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
Quoted 8 lines

mm/Kconfig config MEM_SOFT_DIRTY · line 525

Quoted 4 lines
mm/Kconfig +1 -1
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU

Why CMA has to depend on MMU as well? The MIGRATION part should be sufficient.

Quoted 2 lines

MIGRATION need depend on MMU, when NOMMU, if select CMA, it will select MIGRATION by force.

Ohh, I wasn't aware of this Kcofing limitation. You are right then and CMA needs a dependency as well.

Quoted 25 lines

e.g. for allmodconfig with sh architecture, if we only let MIGRATION depend on MMU, not let CMA depend on MMU, it will report the warning below:

scripts/kconfig/conf --allmodconfig Kconfig
warning: (COMPACTION && CMA) selects MIGRATION which has unmet direct dependencies ((NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU)

And for the final config file, MIGRATION is still enabled, although MMU is not defined.

Quoted 4 lines

mm/Kconfig config MEM_SOFT_DIRTY · line 528

Quoted 3 lines
mm/Kconfig +0 -0
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help

Thanks.

Signature · 7 lines
Chen Gang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by
#4 lore raw
Quoted 48 lines · Michal Hocko
Quoted 47 lines · Chen Gang F T
Quoted 45 lines · Michal Hocko
Quoted 35 lines · Chen Gang

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +1 -1
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in

mm/Kconfig config MEM_SOFT_DIRTY · line 525

Quoted 5 lines
mm/Kconfig +1 -1
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU

Why CMA has to depend on MMU as well? The MIGRATION part should be sufficient.

Quoted 5 lines
Quoted 2 lines

MIGRATION need depend on MMU, when NOMMU, if select CMA, it will select MIGRATION by force.

Ohh, I wasn't aware of this Kcofing limitation. You are right then and CMA needs a dependency as well.

Could you mention this in the changelog please.
Feel free to add

Quoted 35 lines
Quoted 25 lines

e.g. for allmodconfig with sh architecture, if we only let MIGRATION depend on MMU, not let CMA depend on MMU, it will report the warning below:

scripts/kconfig/conf --allmodconfig Kconfig
warning: (COMPACTION && CMA) selects MIGRATION which has unmet direct dependencies ((NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU)

And for the final config file, MIGRATION is still enabled, although MMU is not defined.

Quoted 4 lines

mm/Kconfig config MEM_SOFT_DIRTY · line 528

Quoted 3 lines
mm/Kconfig +0 -0
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help

Thanks.

Signature · 7 lines
Chen Gang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#5 lore raw
Quoted 49 lines · Michal Hocko
Quoted 48 lines · Michal Hocko
Quoted 48 lines · Chen Gang F T
Quoted 47 lines
Quoted 47 lines · Michal Hocko
Quoted 45 lines
Quoted 45 lines · Chen Gang
Quoted 36 lines
Quoted 36 lines

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +1 -1
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
Quoted 4 lines

mm/Kconfig config MEM_SOFT_DIRTY · line 525

Quoted 4 lines
mm/Kconfig +1 -1
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU

Why CMA has to depend on MMU as well? The MIGRATION part should be sufficient.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

MIGRATION need depend on MMU, when NOMMU, if select CMA, it will select MIGRATION by force.

Ohh, I wasn't aware of this Kcofing limitation. You are right then and CMA needs a dependency as well.

OK, thanks.

Every member may make mistakes (e.g. me), although we should try to avoid to make mistakes (at least, every member don't want to make mistakes by themselves ).

Quoted 4 lines

Could you mention this in the changelog please.
Feel free to add

OK, thanks, I will do.

Quoted 37 lines
Quoted 30 lines
Quoted 30 lines
Quoted 25 lines
Quoted 25 lines

e.g. for allmodconfig with sh architecture, if we only let MIGRATION depend on MMU, not let CMA depend on MMU, it will report the warning below:

scripts/kconfig/conf --allmodconfig Kconfig
warning: (COMPACTION && CMA) selects MIGRATION which has unmet direct dependencies ((NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU)

And for the final config file, MIGRATION is still enabled, although MMU is not defined.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

mm/Kconfig config MEM_SOFT_DIRTY · line 528

Quoted 3 lines
mm/Kconfig +0 -0
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help

Thanks.

Signature · 7 lines
Chen Gang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 2 lines
Michal Hocko
SUSE Labs
Quoted 5 lines
Quoted 5 lines

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

-- Michal Hocko SUSE Labs

Signature · 7 lines
Chen Gang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#6 lore raw

PATCH v2 1/1 mm/Kconfig: add MMU dependency for MIGRATION.

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

Also need let CMA depend on MMU, or when NOMMU, if select CMA, it will select MIGRATION by force.

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +2 -2
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help
Signature · 7 lines
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#7 lore raw
Quoted 3 lines · Chen Gang

Sorry for my careless sending: reserving so many waste empty lines.

Quoted 48 lines

MIGRATION need depend on MMU, or allmodconfig for sh architecture which without MMU will be fail for compiling.

The related error:

CC mm/migrate.o
mm/migrate.c: In function 'remove_migration_pte':
mm/migrate.c:134:3: error: implicit declaration of function 'pmd_trans_huge' [-Werror=implicit-function-declaration]

     if (pmd_trans_huge(*pmd))
     ^
  mm/migrate.c:149:2: error: implicit declaration of function 'is_swap_pte' [-Werror=implicit-function-declaration]
    if (!is_swap_pte(pte))
    ^

...

Also need let CMA depend on MMU, or when NOMMU, if select CMA, it will select MIGRATION by force.

---
 mm/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
mm/Kconfig +2 -2
index 256bfd0..e847f19 100644
@@ -245,7 +245,7 @@ config COMPACTION
 config MIGRATION
 	bool "Page migration"
 	def_bool y
-	depends on NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA
+	depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
 	help
 	  Allows the migration of the physical location of pages of processes
 	  while the virtual addresses are not changed. This is useful in
@@ -522,7 +522,7 @@ config MEM_SOFT_DIRTY
 
 config CMA
 	bool "Contiguous Memory Allocator"
-	depends on HAVE_MEMBLOCK
+	depends on HAVE_MEMBLOCK && MMU
 	select MIGRATION
 	select MEMORY_ISOLATION
 	help
Signature · 7 lines
Chen Gang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>