LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* COMPACTION and TRANSPARENT_HUGEPAGE config warning
@ 2011-01-22 14:48 Luca Tettamanti
  2011-01-22 18:38 ` [PATCH] compaction: don't depend on HUGETLB_PAGE Andrea Arcangeli
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Tettamanti @ 2011-01-22 14:48 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: LKML

Hello Andrea,
this commit:

commit 5d6892407cab23d4bf2f6de065ca351a53849323
Author: Andrea Arcangeli <aarcange@redhat.com>
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] compaction: don't depend on HUGETLB_PAGE
  2011-01-22 14:48 COMPACTION and TRANSPARENT_HUGEPAGE config warning Luca Tettamanti
@ 2011-01-22 18:38 ` Andrea Arcangeli
  2011-01-23 17:51   ` Luca Tettamanti
  2011-01-26  8:44   ` Mel Gorman
  0 siblings, 2 replies; 4+ messages in thread
From: Andrea Arcangeli @ 2011-01-22 18:38 UTC (permalink / raw)
  To: Luca Tettamanti; +Cc: LKML, Mel Gorman, Andrew Morton

Hello,

On Sat, Jan 22, 2011 at 03:48:03PM +0100, Luca Tettamanti wrote:
> Hello Andrea,
> this commit:
> 
> commit 5d6892407cab23d4bf2f6de065ca351a53849323
> Author: Andrea Arcangeli <aarcange@redhat.com>
> 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?).

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 <aarcange@redhat.com>

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

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

diff --git a/mm/Kconfig b/mm/Kconfig
index 3ad483b..e9c0c61 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -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.
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] compaction: don't depend on HUGETLB_PAGE
  2011-01-22 18:38 ` [PATCH] compaction: don't depend on HUGETLB_PAGE Andrea Arcangeli
@ 2011-01-23 17:51   ` Luca Tettamanti
  2011-01-26  8:44   ` Mel Gorman
  1 sibling, 0 replies; 4+ messages in thread
From: Luca Tettamanti @ 2011-01-23 17:51 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: LKML, Mel Gorman, Andrew Morton

On Sat, Jan 22, 2011 at 7:38 PM, Andrea Arcangeli <aarcange@redhat.com> wrote:
> Hello,
>
> On Sat, Jan 22, 2011 at 03:48:03PM +0100, Luca Tettamanti wrote:
>> Hello Andrea,
>> this commit:
>>
>> commit 5d6892407cab23d4bf2f6de065ca351a53849323
>> Author: Andrea Arcangeli <aarcange@redhat.com>
>> 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?).
>
> 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

> diff --git a/mm/Kconfig b/mm/Kconfig
> index 3ad483b..e9c0c61 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] compaction: don't depend on HUGETLB_PAGE
  2011-01-22 18:38 ` [PATCH] compaction: don't depend on HUGETLB_PAGE Andrea Arcangeli
  2011-01-23 17:51   ` Luca Tettamanti
@ 2011-01-26  8:44   ` Mel Gorman
  1 sibling, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2011-01-26  8:44 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: Luca Tettamanti, LKML, Andrew Morton

On Sat, Jan 22, 2011 at 07:38:00PM +0100, Andrea Arcangeli wrote:
> Hello,
> 
> On Sat, Jan 22, 2011 at 03:48:03PM +0100, Luca Tettamanti wrote:
> > Hello Andrea,
> > this commit:
> > 
> > commit 5d6892407cab23d4bf2f6de065ca351a53849323
> > Author: Andrea Arcangeli <aarcange@redhat.com>
> > 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?).
> 
> 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.

> Luca does the below fix all your .config problems?
> 
> ====
> Subject: compaction: don't depend on HUGETLB_PAGE
> 
> From: Andrea Arcangeli <aarcange@redhat.com>
> 
> 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).
> 
> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>

I think this is reasonable;

Acked-by: Mel Gorman <mel@csn.ul.ie>

> ---
> 
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 3ad483b..e9c0c61 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -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.
>  
> 

-- 
Mel Gorman
Linux Technology Center
IBM Dublin Software Lab

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-26  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22 14:48 COMPACTION and TRANSPARENT_HUGEPAGE config warning Luca Tettamanti
2011-01-22 18:38 ` [PATCH] compaction: don't depend on HUGETLB_PAGE Andrea Arcangeli
2011-01-23 17:51   ` Luca Tettamanti
2011-01-26  8:44   ` Mel Gorman

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