Re: [PATCH bpf] bpf: preallocate a perf_sample_data per event fd

2019-06-08 Thread Steven Rostedt
On Fri, 31 May 2019 05:26:30 + Song Liu wrote: > We can also do something like > >ee = kzalloc(sizeof(struct bpf_event_entry) + sizeof(struct > perf_sample_data)); >ee->sd = (void *)ee + sizeof(struct bpf_event_entry); Or perhaps: ee->sd = (struct perf_sample_data *)(ee +

Re: [PATCH bpf] bpf: preallocate a perf_sample_data per event fd

2019-05-30 Thread Song Liu
> On May 30, 2019, at 5:01 PM, Matt Mullins wrote: > > On Thu, 2019-05-30 at 23:28 +, Song Liu wrote: >>> On May 30, 2019, at 3:55 PM, Matt Mullins wrote: >>> >>> It is possible that a BPF program can be called while another BPF >>> program is executing bpf_perf_event_output. This has b

Re: [PATCH bpf] bpf: preallocate a perf_sample_data per event fd

2019-05-30 Thread Matt Mullins
On Thu, 2019-05-30 at 23:28 +, Song Liu wrote: > > On May 30, 2019, at 3:55 PM, Matt Mullins wrote: > > > > It is possible that a BPF program can be called while another BPF > > program is executing bpf_perf_event_output. This has been observed with > > I/O completion occurring as a result o

Re: [PATCH bpf] bpf: preallocate a perf_sample_data per event fd

2019-05-30 Thread Song Liu
> On May 30, 2019, at 3:55 PM, Matt Mullins wrote: > > It is possible that a BPF program can be called while another BPF > program is executing bpf_perf_event_output. This has been observed with > I/O completion occurring as a result of an interrupt: > > bpf_prog_247fd1341cddaea4_trace

[PATCH bpf] bpf: preallocate a perf_sample_data per event fd

2019-05-30 Thread Matt Mullins
It is possible that a BPF program can be called while another BPF program is executing bpf_perf_event_output. This has been observed with I/O completion occurring as a result of an interrupt: bpf_prog_247fd1341cddaea4_trace_req_end+0x8d7/0x1000 ? trace_call_bpf+0x82/0x100