[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <F9126AE6-B59E-41A0-A9AA-F5B8499FF0B4@fb.com>
Date: Fri, 11 Mar 2022 23:06:05 +0000
From: Song Liu <songliubraving@...com>
To: Song Liu <song@...nel.org>
CC: "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"ast@...nel.org" <ast@...nel.org>,
"daniel@...earbox.net" <daniel@...earbox.net>,
"andrii@...nel.org" <andrii@...nel.org>,
Kernel Team <Kernel-team@...com>,
"edumazet@...gle.com" <edumazet@...gle.com>
Subject: Re: [PATCH v3 bpf-next] bpf: select proper size for bpf_prog_pack
> On Mar 9, 2022, at 10:35 AM, Song Liu <song@...nel.org> wrote:
>
> Using HPAGE_PMD_SIZE as the size for bpf_prog_pack is not ideal in some
> cases. Specifically, for NUMA systems, __vmalloc_node_range requires
> PMD_SIZE * num_online_nodes() to allocate huge pages. Also, if the system
> does not support huge pages (i.e., with cmdline option nohugevmalloc), it
> is better to use PAGE_SIZE packs.
>
> Add logic to select proper size for bpf_prog_pack. This solution is not
> ideal, as it makes assumption about the behavior of module_alloc and
> __vmalloc_node_range. However, it appears to be the easiest solution as
> it doesn't require changes in module_alloc and vmalloc code.
>
> Fixes: 57631054fae6 ("bpf: Introduce bpf_prog_pack allocator")
> Signed-off-by: Song Liu <song@...nel.org>
sigh... this is tricky:
# CONFIG_MMU is not set
Will fix this in v5.
Song
Powered by blists - more mailing lists