Re: [PATCH bpf v2] bpf: zero-fill re-used per-cpu map element

2020-10-29 Thread Andrii Nakryiko
On Thu, Oct 29, 2020 at 7:44 AM David Verbeiren wrote: > > On Tue, Oct 27, 2020 at 11:55 PM Andrii Nakryiko > wrote: > > Looks good, but would be good to have a unit test (see below). Maybe > > in a follow up. > > Here is the associated new selftest, implementing the sequence you > proposed (than

Re: [PATCH bpf v2] bpf: zero-fill re-used per-cpu map element

2020-10-29 Thread David Verbeiren
On Tue, Oct 27, 2020 at 11:55 PM Andrii Nakryiko wrote: > Looks good, but would be good to have a unit test (see below). Maybe > in a follow up. Here is the associated new selftest, implementing the sequence you proposed (thanks for that!), and also one for LRU case: https://lore.kernel.org/bpf/2

Re: [PATCH bpf v2] bpf: zero-fill re-used per-cpu map element

2020-10-27 Thread Andrii Nakryiko
On Tue, Oct 27, 2020 at 3:15 PM David Verbeiren wrote: > > Zero-fill element values for all other cpus than current, just as > when not using prealloc. This is the only way the bpf program can > ensure known initial values for all cpus ('onallcpus' cannot be > set when coming from the bpf program)

[PATCH bpf v2] bpf: zero-fill re-used per-cpu map element

2020-10-27 Thread David Verbeiren
Zero-fill element values for all other cpus than current, just as when not using prealloc. This is the only way the bpf program can ensure known initial values for all cpus ('onallcpus' cannot be set when coming from the bpf program). The scenario is: bpf program inserts some elements in a per-cpu