bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Stanislav Fomichev <sdf@fomichev.me>
Cc: Andrii Nakryiko <andriin@fb.com>, bpf <bpf@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 0/3] Add support for memory-mapping BPF array maps
Date: Fri, 8 Nov 2019 15:19:59 -0800	[thread overview]
Message-ID: <CAEf4BzZXpEH2YaHeKya5sC6j_Pi5fnPa1DNujV4pubguw4RBRw@mail.gmail.com> (raw)
In-Reply-To: <20191108220843.GA1449846@mini-arch>

On Fri, Nov 8, 2019 at 2:08 PM Stanislav Fomichev <sdf@fomichev.me> wrote:
> On 11/07, Andrii Nakryiko wrote:
> > This patch set adds ability to memory-map BPF array maps (single- and
> > multi-element). The primary use case is memory-mapping BPF array maps, created
> > to back global data variables, created by libbpf implicitly. This allows for
> > much better usability, along with avoiding syscalls to read or update data
> > completely.
> Just wondering: is it something that you plan to extend to other map types?

My main motivation is global data, so normal arrays are the most
important for me. If anyone has any performance-driven use cases, we
can extend others as well, if possible. Not all maps can be easily
mmap()'ed just due to nature of their data. E.g., it's hard to imagine
how hashmap can be mapped. But doing per-cpu arrays should be doable
with good kernel-userspace memory layout "contract".

      reply	other threads:[~2019-11-08 23:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08  4:20 [PATCH bpf-next 0/3] Add support for memory-mapping BPF array maps Andrii Nakryiko
2019-11-08  4:20 ` [PATCH bpf-next 1/3] bpf: add mmap() support for BPF_MAP_TYPE_ARRAY Andrii Nakryiko
2019-11-08  6:39   ` Song Liu
2019-11-08 19:34     ` Andrii Nakryiko
2019-11-11 16:39       ` Song Liu
2019-11-08  4:20 ` [PATCH bpf-next 2/3] libbpf: make global data internal arrays mmap()-able, if possible Andrii Nakryiko
2019-11-08  6:44   ` Song Liu
2019-11-08 19:34     ` Andrii Nakryiko
2019-11-08  4:20 ` [PATCH bpf-next 3/3] selftests/bpf: add BPF_TYPE_MAP_ARRAY mmap() tests Andrii Nakryiko
2019-11-08  6:49   ` Song Liu
2019-11-08 22:08 ` [PATCH bpf-next 0/3] Add support for memory-mapping BPF array maps Stanislav Fomichev
2019-11-08 23:19   ` Andrii Nakryiko [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEf4BzZXpEH2YaHeKya5sC6j_Pi5fnPa1DNujV4pubguw4RBRw@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@fomichev.me \


* 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;
as well as URLs for NNTP newsgroup(s).