Netdev List
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Song Liu <song@kernel.org>
Cc: "bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"andrii@kernel.org" <andrii@kernel.org>,
	Kernel Team <Kernel-team@fb.com>,
	"edumazet@google.com" <edumazet@google.com>
Subject: Re: [PATCH v3 bpf-next] bpf: select proper size for bpf_prog_pack
Date: Fri, 11 Mar 2022 23:06:05 +0000	[thread overview]
Message-ID: <F9126AE6-B59E-41A0-A9AA-F5B8499FF0B4@fb.com> (raw)
In-Reply-To: <20220309183523.3308210-1-song@kernel.org>



> On Mar 9, 2022, at 10:35 AM, Song Liu <song@kernel.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@kernel.org>

sigh... this is tricky:

# CONFIG_MMU is not set

Will fix this in v5. 

Song


      parent reply	other threads:[~2022-03-11 23:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 18:35 [PATCH v3 bpf-next] bpf: select proper size for bpf_prog_pack Song Liu
2022-03-11  7:53 ` [bpf] 4d06f388e1: WARNING:at_kernel/bpf/core.c:#bpf_prog_pack_free kernel test robot
2022-03-11 21:40 ` [PATCH v3 bpf-next] bpf: select proper size for bpf_prog_pack kernel test robot
2022-03-11 23:06 ` Song Liu [this message]

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=F9126AE6-B59E-41A0-A9AA-F5B8499FF0B4@fb.com \
    --to=songliubraving@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --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