From: Nicholas Piggin <npiggin@gmail.com>
To: Christoph Hellwig <hch@infradead.org>, Song Liu <song@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andrii Nakryiko <andrii@kernel.org>,
Alexei Starovoitov <ast@kernel.org>, bpf <bpf@vger.kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
imbrenda@linux.ibm.com, open list <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
Luis Chamberlain <mcgrof@kernel.org>,
rick.p.edgecombe@intel.com
Subject: Re: [PATCH v2 bpf 1/3] vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP
Date: Thu, 21 Apr 2022 13:35:55 +1000 [thread overview]
Message-ID: <1650512125.tnay4e9v4h.astroid@bobo.none> (raw)
In-Reply-To: <1650507506.z839xl6pvt.astroid@bobo.none>
Excerpts from Nicholas Piggin's message of April 21, 2022 12:24 pm:
> Excerpts from Song Liu's message of April 12, 2022 4:00 pm:
>> On Mon, Apr 11, 2022 at 9:18 PM Christoph Hellwig <hch@infradead.org> wrote:
>>>
>>> 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)
>>
>> Will add it in v3.
>>
>>>
>>> >
>>> > 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.
>>
>> @ Claudio and Nicholas,
>>
>> Could you please help identify users of large vmalloc? So far, I found
>> alloc_large_system_hash(), and something like the following seems to
>> work:
>
> The large system hashes were the main ones I was interested in. IIRC
> there was a few more in some drivers or tracing things depending on
> config but those are less important (to me at least).
Oh there is also a reverse map array in KVM now I think of it.
Thanks,
Nick
next prev parent reply other threads:[~2022-04-21 3:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 23:35 [PATCH v2 bpf 0/3] vmalloc: bpf: introduce VM_ALLOW_HUGE_VMAP Song Liu
2022-04-11 23:35 ` [PATCH v2 bpf 1/3] vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP Song Liu
2022-04-12 4:18 ` Christoph Hellwig
2022-04-12 6:00 ` Song Liu
2022-04-21 2:24 ` Nicholas Piggin
2022-04-21 3:35 ` Nicholas Piggin [this message]
2022-04-11 23:35 ` [PATCH v2 bpf 2/3] module: introduce module_alloc_huge Song Liu
2022-04-12 4:20 ` Christoph Hellwig
2022-04-12 6:11 ` Song Liu
2022-04-11 23:35 ` [PATCH v2 bpf 3/3] bpf: use module_alloc_huge for bpf_prog_pack Song Liu
2022-04-11 23:52 ` Song Liu
2022-04-11 23:35 ` [PATCH v2 bpf 3/3] bpf: use vmalloc with VM_ALLOW_HUGE_VMAP " Song Liu
2022-04-12 4:20 ` Christoph Hellwig
2022-04-12 6:12 ` Song Liu
2022-04-12 17:20 ` Edgecombe, Rick P
2022-04-12 21:00 ` Song Liu
2022-04-13 15:51 ` Edgecombe, Rick P
-- strict thread matches above, loose matches on Subject: below --
2022-04-11 23:18 [PATCH v2 bpf 0/3] vmalloc: bpf: introduce VM_ALLOW_HUGE_VMAP Song Liu
2022-04-11 23:18 ` [PATCH v2 bpf 1/3] vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP Song Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1650512125.tnay4e9v4h.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hch@infradead.org \
--cc=imbrenda@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=rick.p.edgecombe@intel.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox