Re: eBPF verifier slowness, more than 2 cpu seconds for about 600 instructions

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

 



On Sun, Jun 16, 2019 at 11:59 PM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Thu, Jun 6, 2019 at 6:31 PM Andreas Steinmetz <ast@xxxxxxxx> wrote:
> >
> > Below is the source in question. It may look a bit strange but I
> > had to extract it from the project and preset parameters to fixed
> > values.
> > It takes from 2.8 to 4.5 seconds to load, depending on the processor.
> > Just compile and run the code below.
>
> Thanks for the report.
> It's interesting one indeed.
> 600+ instructions consume
> processed 280464 insns (limit 1000000) max_states_per_insn 15
> total_states 87341 peak_states 580 mark_read 45
>
> The verifier finds a lot of different ways to go through branches
> in the program and majority of the states are not equivalent and
> do not help pruning, so it's doing full brute force walk of all possible
> combinations.
> We need to figure out whether there is a way to make it smarter.

btw my pending backtracking logic helps it quite a bit:
processed 164110 insns (limit 1000000) max_states_per_insn 11
total_states 13398 peak_states 349 mark_read 10

and it's 2x faster to verify, but 164k insns processed shows that
there is still room for improvement.



[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