Re: [PATCH v4 bpf-next 2/5] bpf: Introduce sleepable BPF programs

From
Alexei Starovoitov <hidden>
Date
2020-06-30 03:03:40
Also in
bpf
Reply to
Andrii Nakryiko, 2020-06-30
On Mon, Jun 29, 2020 at 06:15:41PM -0700, Andrii Nakryiko wrote:
quoted

+/* when rcu_read_lock_trace is held it means that some sleepable bpf program is
+ * running. Those programs can use bpf arrays and preallocated hash maps. These
+ * map types are waiting on programs to complete via
+ * synchronize_rcu_tasks_trace();
Wanted to leave comment that "map types are waiting" is outdated after
patch #1 and then recalled map-in-map complexities. So depending if
I'm right or wrong regarding issue in patch #1, this would stay or has
to be removed.
Good catch. The comment is outdated.
map-in-map is not supported with sleepable yet simply because I didn't have
time to think it through.
quoted
+                       verbose(env,
+                               "Sleepable programs can only use array and hash maps\n");
nit: message is a bit misleading. per-cpu array is also an array, yet
is not supported.
yes. It's generic to avoid updating it too often. map-in-map is also not supported yet,
but it's a hash and array too.
Thread (16 messages) 16 messages, 2 authors, last reply 2020-06-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help