Re: [PATCH v2 bpf-next 2/3] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs

2019-06-26 Thread Andrii Nakryiko
On Wed, Jun 26, 2019 at 11:57 AM Song Liu wrote: > > > > > On Jun 25, 2019, at 11:12 PM, Andrii Nakryiko wrote: > > > > For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of > > possible CPUs. This is impossible to specify at compilation time. This > > change adds automatic settin

Re: [PATCH v2 bpf-next 2/3] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs

2019-06-26 Thread Song Liu
> On Jun 25, 2019, at 11:12 PM, Andrii Nakryiko wrote: > > For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of > possible CPUs. This is impossible to specify at compilation time. This > change adds automatic setting of PERF_EVENT_ARRAY size to number of > system CPUs, unless

[PATCH v2 bpf-next 2/3] libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs

2019-06-25 Thread Andrii Nakryiko
For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of possible CPUs. This is impossible to specify at compilation time. This change adds automatic setting of PERF_EVENT_ARRAY size to number of system CPUs, unless non-zero size is specified explicitly. This allows to adjust size for