linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: kconfig: make Transparent Hugepage Support sysfs defaults to match the documentation
@ 2019-11-19  3:01 Rafael Aquini
  2019-11-19 10:47 ` Kirill A. Shutemov
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael Aquini @ 2019-11-19  3:01 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel

Documentation/admin-guide/mm/transhuge.rst (originally in Documentation/vm/transhuge.txt)
states that TRANSPARENT_HUGEPAGE_MADVISE is the default option for THP config:

"
madvise
        will enter direct reclaim like ``always`` but only for regions
        that are have used madvise(MADV_HUGEPAGE). This is the default
        behaviour.
"

This patch changes mm/Kconfig to reflect that fact, accordingly.
Besides keeping consistency between documentation and the code behavior,
other reasons to perform this minor adjustment are noted at:
https://bugzilla.redhat.com/show_bug.cgi?id=1772133

Signed-off-by: Rafael Aquini <aquini@redhat.com>
---
 mm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index a5dae9a7eb51..c12a559aa1e5 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -385,7 +385,7 @@ config TRANSPARENT_HUGEPAGE
 choice
 	prompt "Transparent Hugepage Support sysfs defaults"
 	depends on TRANSPARENT_HUGEPAGE
-	default TRANSPARENT_HUGEPAGE_ALWAYS
+	default TRANSPARENT_HUGEPAGE_MADVISE
 	help
 	  Selects the sysfs defaults for Transparent Hugepage Support.
 
-- 
2.17.2


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

* Re: [PATCH] mm: kconfig: make Transparent Hugepage Support sysfs defaults to match the documentation
  2019-11-19  3:01 [PATCH] mm: kconfig: make Transparent Hugepage Support sysfs defaults to match the documentation Rafael Aquini
@ 2019-11-19 10:47 ` Kirill A. Shutemov
  2019-11-19 14:58   ` Rafael Aquini
  0 siblings, 1 reply; 3+ messages in thread
From: Kirill A. Shutemov @ 2019-11-19 10:47 UTC (permalink / raw)
  To: Rafael Aquini; +Cc: linux-mm, linux-kernel

On Mon, Nov 18, 2019 at 10:01:02PM -0500, Rafael Aquini wrote:
> Documentation/admin-guide/mm/transhuge.rst (originally in Documentation/vm/transhuge.txt)
> states that TRANSPARENT_HUGEPAGE_MADVISE is the default option for THP config:
> 
> "
> madvise
>         will enter direct reclaim like ``always`` but only for regions
>         that are have used madvise(MADV_HUGEPAGE). This is the default
>         behaviour.
> "
> 
> This patch changes mm/Kconfig to reflect that fact, accordingly.

No. You've read it incorrectly.

The documentation describes default behaviour wrt defragmentaton ("defrag"
file), not page fault ("enabled" file). We don't have any Kconfig option
to set default behaviour for "defrag".

> Besides keeping consistency between documentation and the code behavior,
> other reasons to perform this minor adjustment are noted at:
> https://bugzilla.redhat.com/show_bug.cgi?id=1772133
> 
> Signed-off-by: Rafael Aquini <aquini@redhat.com>
> ---
>  mm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/Kconfig b/mm/Kconfig
> index a5dae9a7eb51..c12a559aa1e5 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -385,7 +385,7 @@ config TRANSPARENT_HUGEPAGE
>  choice
>  	prompt "Transparent Hugepage Support sysfs defaults"
>  	depends on TRANSPARENT_HUGEPAGE
> -	default TRANSPARENT_HUGEPAGE_ALWAYS
> +	default TRANSPARENT_HUGEPAGE_MADVISE
>  	help
>  	  Selects the sysfs defaults for Transparent Hugepage Support.
>  
> -- 
> 2.17.2
> 
> 

-- 
 Kirill A. Shutemov

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

* Re: [PATCH] mm: kconfig: make Transparent Hugepage Support sysfs defaults to match the documentation
  2019-11-19 10:47 ` Kirill A. Shutemov
@ 2019-11-19 14:58   ` Rafael Aquini
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael Aquini @ 2019-11-19 14:58 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: linux-mm, linux-kernel

On Tue, Nov 19, 2019 at 01:47:41PM +0300, Kirill A. Shutemov wrote:
> On Mon, Nov 18, 2019 at 10:01:02PM -0500, Rafael Aquini wrote:
> > Documentation/admin-guide/mm/transhuge.rst (originally in Documentation/vm/transhuge.txt)
> > states that TRANSPARENT_HUGEPAGE_MADVISE is the default option for THP config:
> > 
> > "
> > madvise
> >         will enter direct reclaim like ``always`` but only for regions
> >         that are have used madvise(MADV_HUGEPAGE). This is the default
> >         behaviour.
> > "
> > 
> > This patch changes mm/Kconfig to reflect that fact, accordingly.
> 
> No. You've read it incorrectly.
>
Fair enough.

I'll reform the log message then, and repost.
 
> The documentation describes default behaviour wrt defragmentaton ("defrag"
> file), not page fault ("enabled" file). We don't have any Kconfig option
> to set default behaviour for "defrag".
> 
> > Besides keeping consistency between documentation and the code behavior,
> > other reasons to perform this minor adjustment are noted at:
> > https://bugzilla.redhat.com/show_bug.cgi?id=1772133
> > 
> > Signed-off-by: Rafael Aquini <aquini@redhat.com>
> > ---
> >  mm/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/mm/Kconfig b/mm/Kconfig
> > index a5dae9a7eb51..c12a559aa1e5 100644
> > --- a/mm/Kconfig
> > +++ b/mm/Kconfig
> > @@ -385,7 +385,7 @@ config TRANSPARENT_HUGEPAGE
> >  choice
> >  	prompt "Transparent Hugepage Support sysfs defaults"
> >  	depends on TRANSPARENT_HUGEPAGE
> > -	default TRANSPARENT_HUGEPAGE_ALWAYS
> > +	default TRANSPARENT_HUGEPAGE_MADVISE
> >  	help
> >  	  Selects the sysfs defaults for Transparent Hugepage Support.
> >  
> > -- 
> > 2.17.2
> > 
> > 
> 
> -- 
>  Kirill A. Shutemov
> 


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

end of thread, other threads:[~2019-11-19 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19  3:01 [PATCH] mm: kconfig: make Transparent Hugepage Support sysfs defaults to match the documentation Rafael Aquini
2019-11-19 10:47 ` Kirill A. Shutemov
2019-11-19 14:58   ` Rafael Aquini

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