[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlT9i9DFvwDx9+AD@infradead.org>
Date: Mon, 11 Apr 2022 21:18:19 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Song Liu <song@...nel.org>
Cc: bpf@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, akpm@...ux-foundation.org,
rick.p.edgecombe@...el.com, hch@...radead.org,
imbrenda@...ux.ibm.com, mcgrof@...nel.org,
Nicholas Piggin <npiggin@...il.com>
Subject: Re: [PATCH v2 bpf 1/3] vmalloc: replace VM_NO_HUGE_VMAP with
VM_ALLOW_HUGE_VMAP
On Mon, Apr 11, 2022 at 04:35:46PM -0700, Song Liu wrote:
> Huge page backed vmalloc memory could benefit performance in many cases.
> Since some users of vmalloc may not be ready to handle huge pages,
> VM_NO_HUGE_VMAP was introduced to allow vmalloc users to opt-out huge
> pages. However, it is not easy to add VM_NO_HUGE_VMAP to all the users
> that may try to allocate >= PMD_SIZE pages, but are not ready to handle
> huge pages properly.
This is a good place to document what the problems are, and how they are
hard to track down (e.g. because the allocations are passed down I/O
stacks)
>
> Replace VM_NO_HUGE_VMAP with an opt-in flag, VM_ALLOW_HUGE_VMAP, so that
> users that benefit from huge pages could ask specificially.
>
> Also, replace vmalloc_no_huge() with opt-in helper vmalloc_huge().
We still need to find out what the primary users of the large vmalloc
hashes was and convert them.
> +extern void *vmalloc_huge(unsigned long size) __alloc_size(1);
No need for the extern.
> +EXPORT_SYMBOL(vmalloc_huge);
EXPORT_SYMBOL_GPL for all advanced vmalloc functionality, please.
Powered by blists - more mailing lists