All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] flexible size for bpf_prog_pack
@ 2022-02-10  6:41 Song Liu
  2022-02-10  6:41 ` [PATCH bpf-next 1/2] vmalloc: expose vmap_allow_huge via get_vmap_allow_huge() Song Liu
  2022-02-10  6:41 ` [PATCH bpf-next 2/2] bpf: flexible size for bpf_prog_pack Song Liu
  0 siblings, 2 replies; 8+ messages in thread
From: Song Liu @ 2022-02-10  6:41 UTC (permalink / raw)
  To: linux-mm, bpf, netdev
  Cc: ast, daniel, andrii, kernel-team, akpm, eric.dumazet, Song Liu

There are two issues with bpf_prog_pack:

(1) On NUMA systems, bpf_prog_pack need to be bigger
    (PMD_SIZE * num_online_nodes) to use huge pages.
(2) If the system doesn't support huge pages (nohugevmalloc in cmdline),
    allocating PMD_SIZE for bpf_prog_pack is a waste.

Address these issues with flexible bpf_prog_pack_size().

Song Liu (2):
  vmalloc: expose vmap_allow_huge via get_vmap_allow_huge()
  bpf: flexible size for bpf_prog_pack

 include/linux/vmalloc.h |  1 +
 kernel/bpf/core.c       | 47 +++++++++++++++++++++++------------------
 mm/vmalloc.c            |  5 +++++
 3 files changed, 33 insertions(+), 20 deletions(-)

--
2.30.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-01 23:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  6:41 [PATCH bpf-next 0/2] flexible size for bpf_prog_pack Song Liu
2022-02-10  6:41 ` [PATCH bpf-next 1/2] vmalloc: expose vmap_allow_huge via get_vmap_allow_huge() Song Liu
2022-02-10  6:41 ` [PATCH bpf-next 2/2] bpf: flexible size for bpf_prog_pack Song Liu
2022-02-10  8:25   ` Daniel Borkmann
2022-02-10 16:51     ` Song Liu
2022-02-11 14:35       ` Daniel Borkmann
2022-02-11 19:42         ` Song Liu
2022-03-01 23:01           ` Song Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.