Re: Why is BPF_PERF_OUTPUT max_entries set to total processor count?
Hayden Livingston
Thanks. I had to re-read your reply and the kernel code multiple
toggle quoted messageShow quoted text
times, but I think I get it now. Please confirm. It is this call is made by user mode code: fd = bpf_create_map(BPF_MAP_TYPE_PERF_EVENT_ARRAY, /*key_size*/ sizeof(int), /*value_size*/ sizeof(int), NUM_POSSIBLE_CPUS, 0); key is smp_processor_id. value is perf_events fd. This is why the map is both is key integer and value integer. Why so many indirections? Is it to support pinning where user program can different ring buffers? To me it seems the kernel code that uses cpu index to look into array could just to told fd directly.
On Sun, Feb 16, 2020 at 1:50 PM Y Song <ys114321@...> wrote:
|
|