From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
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>,
Johannes Weiner <hannes@cmpxchg.org>,
Rik van Riel <riel@surriel.com>
Subject: Re: [PATCH v4 bpf-next 2/4] bpf: add mmap() support for BPF_MAP_TYPE_ARRAY
Date: Fri, 15 Nov 2019 12:42:49 -0800 [thread overview]
Message-ID: <20191115124249.0ad3496d@cakuba.netronome.com> (raw)
In-Reply-To: <CAEf4Bzat=GDcZWWpGkPWYBJvpKA=PvhhP0QZrEcOOkQz3WvnaA@mail.gmail.com>
On Fri, 15 Nov 2019 08:36:56 -0800, Andrii Nakryiko wrote:
> Alternatively we can use spinlock. I don't think it's too ugly, tbh. See below.
>
> From 0da495b911adad495857f1c0fc3596f1d06a705f Mon Sep 17 00:00:00 2001
> From: Andrii Nakryiko <andriin@fb.com>
> Date: Fri, 15 Nov 2019 08:32:43 -0800
> Subject: [PATCH bpf-next] bpf: switch freeze locking to use spin_lock and save
> space
>
> Switch to spin_lock in favor of mutex. Due to mmap-ing itself happening not
> under spinlock, there needs to be an extra "correction" step for writecnt, if
> mapping fails.
FWIW I was pondering that too, and thought your initial design was
nicer, the transient errors sometimes become a major PITA.
next prev parent reply other threads:[~2019-11-15 20:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 4:02 [PATCH v4 bpf-next 0/4] Add support for memory-mapping BPF array maps Andrii Nakryiko
2019-11-15 4:02 ` [PATCH v4 bpf-next 1/4] bpf: switch bpf_map ref counter to 64bit so bpf_map_inc never fails Andrii Nakryiko
2019-11-15 21:47 ` Song Liu
2019-11-15 23:23 ` Daniel Borkmann
2019-11-15 23:27 ` Andrii Nakryiko
2019-11-15 4:02 ` [PATCH v4 bpf-next 2/4] bpf: add mmap() support for BPF_MAP_TYPE_ARRAY Andrii Nakryiko
2019-11-15 4:45 ` Alexei Starovoitov
2019-11-15 5:05 ` Andrii Nakryiko
2019-11-15 5:08 ` Alexei Starovoitov
2019-11-15 5:43 ` Andrii Nakryiko
2019-11-15 16:36 ` Andrii Nakryiko
2019-11-15 20:42 ` Jakub Kicinski [this message]
2019-11-15 13:57 ` Johannes Weiner
2019-11-15 23:31 ` Daniel Borkmann
2019-11-15 23:37 ` Alexei Starovoitov
2019-11-15 23:44 ` Daniel Borkmann
2019-11-15 23:47 ` Alexei Starovoitov
2019-11-16 0:13 ` Daniel Borkmann
2019-11-16 1:18 ` Alexei Starovoitov
2019-11-17 5:57 ` Andrii Nakryiko
2019-11-17 12:07 ` Daniel Borkmann
2019-11-17 17:17 ` Andrii Nakryiko
2019-11-18 13:50 ` Daniel Borkmann
2019-11-15 4:02 ` [PATCH v4 bpf-next 3/4] libbpf: make global data internal arrays mmap()-able, if possible Andrii Nakryiko
2019-11-15 4:02 ` [PATCH v4 bpf-next 4/4] selftests/bpf: add BPF_TYPE_MAP_ARRAY mmap() tests Andrii Nakryiko
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=20191115124249.0ad3496d@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=riel@surriel.com \
/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