On 10/29/17 1:14 PM, Sebastian Andrzej Siewior wrote:
On 2017-10-27 19:18:40 [-0700], Alexei Starovoitov wrote:
pcpu_freelist_push() is called by bpf programs from atomic context.

so raw would still be correct because the content is locked.

it would be incorrect because this_* versions have good checks in them
and no need to avoid them.

lockdep thinks that __pcpu_freelist_push() can be called recursively
in the middle of pcpu_freelist_populate's loop and will deadlock
which is not the case here. That's why local_irq_save() is there.
Just to silence lockdep.

do you mind giving me bunch of test-cases so I can test it myself?

samples/bpf/map_perf_test*

While developing pcpu_freelist I've benchmarked many different
approaches. Some of the numbers are in
commit 6c9059817432 ("bpf: pre-allocate hash map elements")
iirc I passed on llist, since llist_del_first still needs a lock,
so doesn't really help.

Okay. I will look that up.

Sebastian


Reply via email to