Skip to contentSkip to conversation

COMPACTION and TRANSPARENT_HUGEPAGE config warning

PATCH In review Luca Tettamanti 3 participants 4 messages Jan 22, 2011 – Jan 26, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Andrea,
this commit:

commit 5d6892407cab23d4bf2f6de065ca351a53849323

Author: Andrea Arcangeli <[email protected]>
Date:   Thu Jan 13 15:47:07 2011 -0800

thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE enabled

causes this warning during the configuration process:

warning: (TRANSPARENT_HUGEPAGE) selects COMPACTION which has unmet direct dependencies (EXPERIMENTAL && HUGETLB_PAGE && MMU)

This happens because 'select' does not enable the dependencies of its target, so when I selected THP it also enabled COMPATION but I don't have HUGETLBFS (=HUGETLB_PAGE) enabled.
Making THP select HUGETLB_PAGE fixes the warning but I'm not 100% sure that's correct (does it work without HUGETLBFS?).

Luca

#1 lore raw

PATCH 1/1 compaction: don't depend on HUGETLB_PAGE

Hello,

Quoted 11 lines · Luca Tettamanti

Hello Andrea,
this commit:

commit 5d6892407cab23d4bf2f6de065ca351a53849323

Author: Andrea Arcangeli <[email protected]>
Date:   Thu Jan 13 15:47:07 2011 -0800

thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE enabled

causes this warning during the configuration process:

Quoted 8 lines

warning: (TRANSPARENT_HUGEPAGE) selects COMPACTION which has unmet direct dependencies (EXPERIMENTAL && HUGETLB_PAGE && MMU)

This happens because 'select' does not enable the dependencies of its target, so when I selected THP it also enabled COMPATION but I don't have HUGETLBFS (=HUGETLB_PAGE) enabled.
Making THP select HUGETLB_PAGE fixes the warning but I'm not 100% sure that's correct (does it work without HUGETLBFS?).

Mel, what's your take about this issue?

Luca does the below fix all your .config problems?

====
Subject: compaction: don't depend on HUGETLB_PAGE

From: Andrea Arcangeli <[email protected]>

COMPACTION doesn't depend on HUGETLB_PAGE, it doesn't depend on THP either, it is also useful for regular alloc_pages(order > 0) including the very kernel stack during fork (THREAD_ORDER = 1). It's always better to enable COMPACTION.

The warning should be an error because we would end up with MIGRATION not selected, and COMPACTION wouldn't work without migration (despite it seems to build with an inline migrate_pages returning -ENOSYS).

I'd also like to remove EXPERIMENTAL: compaction has been in the kernel for some releases (for full safety the default remains disabled which I think is enough).

---

mm/Kconfig +1 -1
index 3ad483b..e9c0c61 100644
@@ -179,7 +179,7 @@ config SPLIT_PTLOCK_CPUS
 config COMPACTION
 	bool "Allow for memory compaction"
 	select MIGRATION
-	depends on EXPERIMENTAL && HUGETLB_PAGE && MMU
+	depends on MMU
 	help
 	  Allows the compaction of memory for the allocation of huge pages.
 
#2 lore raw

Re: [PATCH] compaction: don't depend on HUGETLB_PAGE

Quoted 23 lines · Andrea Arcangeli

Hello,

Quoted 11 lines · Luca Tettamanti

Hello Andrea,
this commit:

commit 5d6892407cab23d4bf2f6de065ca351a53849323
Author: Andrea Arcangeli <[email protected]>
Date:   Thu Jan 13 15:47:07 2011 -0800

    thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE enabled

causes this warning during the configuration process:

Quoted 8 lines

warning: (TRANSPARENT_HUGEPAGE) selects COMPACTION which has unmet direct dependencies (EXPERIMENTAL && HUGETLB_PAGE && MMU)

This happens because 'select' does not enable the dependencies of its target, so when I selected THP it also enabled COMPATION but I don't have HUGETLBFS (=HUGETLB_PAGE) enabled.
Making THP select HUGETLB_PAGE fixes the warning but I'm not 100% sure that's correct (does it work without HUGETLBFS?).

Quoted 3 lines

Mel, what's your take about this issue?

Luca does the below fix all your .config problems?

Yes, no more warnings; I haven't tested the kernel though.

Luca

Quoted 12 lines
mm/Kconfig +0 -0
index 3ad483b..e9c0c61 100644
@@ -179,7 +179,7 @@ config SPLIT_PTLOCK_CPUS

 config COMPACTION
       bool "Allow for memory compaction"
       select MIGRATION
-       depends on EXPERIMENTAL && HUGETLB_PAGE && MMU
+       depends on MMU
       help
         Allows the compaction of memory for the allocation of huge pages.

Acked-by on v1 1/1
#3 lore raw

Re: [PATCH] compaction: don't depend on HUGETLB_PAGE

In reply to Andrea Arcangeli
Quoted 17 lines · Andrea Arcangeli

Hello,

Quoted 14 lines · Luca Tettamanti

Hello Andrea,
this commit:

commit 5d6892407cab23d4bf2f6de065ca351a53849323

Author: Andrea Arcangeli <[email protected]>
Date:   Thu Jan 13 15:47:07 2011 -0800

thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE enabled

causes this warning during the configuration process:

warning: (TRANSPARENT_HUGEPAGE) selects COMPACTION which has unmet direct dependencies (EXPERIMENTAL && HUGETLB_PAGE && MMU)

Quoted 8 lines
Quoted 5 lines

This happens because 'select' does not enable the dependencies of its target, so when I selected THP it also enabled COMPATION but I don't have HUGETLBFS (=HUGETLB_PAGE) enabled.
Making THP select HUGETLB_PAGE fixes the warning but I'm not 100% sure that's correct (does it work without HUGETLBFS?).

Mel, what's your take about this issue?

The dependencies were only in the name of being conservative. Hugetlbfs was initially the only expected user of compaction so making it depend was meant to restrict who might enable it and is not a true dependency. It was marked experimental at the start for obvious reasons.

Quoted 16 lines

Luca does the below fix all your .config problems?

====
Subject: compaction: don't depend on HUGETLB_PAGE

From: Andrea Arcangeli <[email protected]>

COMPACTION doesn't depend on HUGETLB_PAGE, it doesn't depend on THP either, it is also useful for regular alloc_pages(order > 0) including the very kernel stack during fork (THREAD_ORDER = 1). It's always better to enable COMPACTION.

The warning should be an error because we would end up with MIGRATION not selected, and COMPACTION wouldn't work without migration (despite it seems to build with an inline migrate_pages returning -ENOSYS).

Quoted 5 lines

I'd also like to remove EXPERIMENTAL: compaction has been in the kernel for some releases (for full safety the default remains disabled which I think is enough).

I think this is reasonable;

Quoted 16 lines

---

mm/Kconfig +1 -1
index 3ad483b..e9c0c61 100644
@@ -179,7 +179,7 @@ config SPLIT_PTLOCK_CPUS
 config COMPACTION
 	bool "Allow for memory compaction"
 	select MIGRATION
-	depends on EXPERIMENTAL && HUGETLB_PAGE && MMU
+	depends on MMU
 	help
 	  Allows the compaction of memory for the allocation of huge pages.
 
Signature · 3 lines
Mel Gorman
Linux Technology Center
IBM Dublin Software Lab