[v6,6/8] hugetlb: have CONFIG_HUGETLBFS select CONFIG_PADATA

Message ID 20240222140422.393911-7-gang.li@linux.dev
State New
Headers
Series hugetlb: parallelize hugetlb page init on boot |

Commit Message

Gang Li Feb. 22, 2024, 2:04 p.m. UTC
  Allow hugetlb use padata_do_multithreaded for parallel initialization.
Select CONFIG_PADATA in this case.

Signed-off-by: Gang Li <ligang.bdlg@bytedance.com>
Tested-by: David Rientjes <rientjes@google.com>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
---
 fs/Kconfig | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Daniel Jordan Feb. 27, 2024, 9:26 p.m. UTC | #1
On Thu, Feb 22, 2024 at 10:04:19PM +0800, Gang Li wrote:
> Allow hugetlb use padata_do_multithreaded for parallel initialization.
> Select CONFIG_PADATA in this case.
> 
> Signed-off-by: Gang Li <ligang.bdlg@bytedance.com>
> Tested-by: David Rientjes <rientjes@google.com>
> Reviewed-by: Muchun Song <muchun.song@linux.dev>
> Tested-by: Paul E. McKenney <paulmck@kernel.org>

Acked-by: Daniel Jordan <daniel.m.jordan@oracle.com>

> ---
>  fs/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/Kconfig b/fs/Kconfig
> index 89fdbefd1075f..c0b9599bf8e3a 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -262,6 +262,7 @@ menuconfig HUGETLBFS
>  	depends on X86 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN
>  	depends on (SYSFS || SYSCTL)
>  	select MEMFD_CREATE
> +	select PADATA if SMP
>  	help
>  	  hugetlbfs is a filesystem backing for HugeTLB pages, based on
>  	  ramfs. For architectures that support it, say Y here and read
> -- 
> 2.20.1
>
  

Patch

diff --git a/fs/Kconfig b/fs/Kconfig
index 89fdbefd1075f..c0b9599bf8e3a 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -262,6 +262,7 @@  menuconfig HUGETLBFS
 	depends on X86 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN
 	depends on (SYSFS || SYSCTL)
 	select MEMFD_CREATE
+	select PADATA if SMP
 	help
 	  hugetlbfs is a filesystem backing for HugeTLB pages, based on
 	  ramfs. For architectures that support it, say Y here and read