BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: "Jose E. Marchesi" <jose.marchesi@oracle.com>,
	Yonghong Song <yonghong.song@linux.dev>
Cc: bpf@vger.kernel.org, Yonghong Song <yhs@meta.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	david.faust@oracle.com,  cupertino.miranda@oracle.com
Subject: Re: [PATCH bpf-next] bpf: abstract loop unrolling pragmas in BPF selftests
Date: Thu, 08 Feb 2024 21:34:09 +0200	[thread overview]
Message-ID: <a21d4915bb861ac5c2def8ea2f48c99689cc854a.camel@gmail.com> (raw)
In-Reply-To: <875xyydbir.fsf@oracle.com>

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")

  reply	other threads:[~2024-02-08 19:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 10:12 [PATCH bpf-next] bpf: abstract loop unrolling pragmas in BPF selftests Jose E. Marchesi
2024-02-07 21:45 ` Yonghong Song
2024-02-08 11:32   ` Jose E. Marchesi
2024-02-08 12:55     ` Jose E. Marchesi
2024-02-08 14:18       ` Eduard Zingerman
2024-02-08 15:05         ` Jose E. Marchesi
2024-02-08 15:28           ` Eduard Zingerman
2024-02-08 15:35             ` Jose E. Marchesi
2024-02-08 15:53               ` Eduard Zingerman
2024-02-08 16:51                 ` Jose E. Marchesi
2024-02-08 18:04                   ` Yonghong Song
2024-02-08 18:35                     ` Yonghong Song
2024-02-08 18:59                       ` Jose E. Marchesi
2024-02-08 19:03                         ` Jose E. Marchesi
2024-02-08 19:34                           ` Eduard Zingerman [this message]
2024-02-08 19:44                           ` Yonghong Song
2024-02-08 19:49   ` Yonghong Song
2024-02-08 20:06     ` Jose E. Marchesi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a21d4915bb861ac5c2def8ea2f48c99689cc854a.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=cupertino.miranda@oracle.com \
    --cc=david.faust@oracle.com \
    --cc=jose.marchesi@oracle.com \
    --cc=yhs@meta.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox