Re: [PATCH v2 bpf-next 06/12] bpf: Add bpf_core_add_cands() and wire it into bpf_core_apply_relo_insn().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 16, 2021 at 05:31:14PM -0800, Andrii Nakryiko wrote:
> > +                }
> > +       }
> > +       err = bpf_core_apply_relo_insn((void *)log, insn, relo->insn_off / 8,
> > +                                      relo, relo_idx, btf, cands);
> > +       bpf_core_free_cands(cands);
> 
> Why did you decide to not persist the candidate list? It is a
> significant slowdown even on moderately large BPF programs, as you are
> linearly re-searching vmlinux BTF multiple times for the same root
> type.

Somehow I convinced myself that it's not a correct thing to do across
multiple relocations. Yeah. Will move the free to be after the loop.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux