Message ID | 20220330225642.1163897-4-song@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | introduce HAVE_ARCH_HUGE_VMALLOC_FLAG for bpf_prog_pack | expand |
On Wed, Mar 30 2022 at 15:56, Song Liu wrote: > As HAVE_ARCH_HUGE_VMALLOC is not ready for X86_64, enable > HAVE_ARCH_HUGE_VMALLOC_FLAG to allow bpf_prog_pack to allocate huge > pages. Despite HAVE_ARCH_HUGE_VMALLOC being not ready for X86_64 enable it nevertheless? I assume you wanted to say something like this: The shortcomings of huge vmalloc allocations have been fixed in the memory management core code, so reenable HAVE_ARCH_HUGE_VMALLOC. Thanks, tglx
> On Mar 30, 2022, at 4:54 PM, Thomas Gleixner <tglx@linutronix.de> wrote: > > On Wed, Mar 30 2022 at 15:56, Song Liu wrote: >> As HAVE_ARCH_HUGE_VMALLOC is not ready for X86_64, enable >> HAVE_ARCH_HUGE_VMALLOC_FLAG to allow bpf_prog_pack to allocate huge >> pages. > > Despite HAVE_ARCH_HUGE_VMALLOC being not ready for X86_64 enable it > nevertheless? These are two different flags: HAVE_ARCH_HUGE_VMALLOC allows vmalloc to try to allocate huge pages for size >= PMD_SIZE, unless it is disabled with nohugeiomap or VM_NO_HUGE_VMAP. HAVE_ARCH_HUGE_VMALLOC_FLAG allows vmalloc to try to allocate huge pages for size >= PMD_SIZE, only when the user specifies VM_TRY_HUGE_VMAP. Recommendations for better naming will be highly appreciated.. Song > > I assume you wanted to say something like this: > > The shortcomings of huge vmalloc allocations have been fixed in the > memory management core code, so reenable HAVE_ARCH_HUGE_VMALLOC. > > Thanks, > > tglx
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 4691d3aef681..2195120c8ebb 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -161,6 +161,7 @@ config X86 select HAVE_ALIGNED_STRUCT_PAGE if SLUB select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_HUGE_VMAP if X86_64 || X86_PAE + select HAVE_ARCH_HUGE_VMALLOC_FLAG if X86_64 select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if X86_64
As HAVE_ARCH_HUGE_VMALLOC is not ready for X86_64, enable HAVE_ARCH_HUGE_VMALLOC_FLAG to allow bpf_prog_pack to allocate huge pages. Signed-off-by: Song Liu <song@kernel.org> --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+)