Re: [PATCH bpf-next] bpf: abstract loop unrolling pragmas in BPF selftests

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

 



On Thu, 2024-02-08 at 20:03 +0100, Jose E. Marchesi wrote:
[...]

> This makes me wonder, asking from ignorance: what is the benefit/point
> for BPF programs to partially unroll a loop?  I would have said either
> we unroll them completely in order to avoid verification problems, or we
> don't unroll them because the verifier is supposed to handle it the way
> it is written...

Generally speaking, I'd agree.
But basing on the git history, this specific test was added to check
if verifier is capable to process some specific pattern generated by clang.
See [0]:

    The main purpose of the profiler test to check different llvm generation
    patterns to make sure the verifier can load these large programs.

I'd say it would be fair to select any reasonable combination
of unroll pragmas for GCC, e.g. use unroll(fully) instead of "unroll".

[0] 03d4d13fab3f ("selftests/bpf: Add profiler test")





[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