From: Namhyung Kim <namhyung@kernel.org>
To: Viktor Malik <vmalik@redhat.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
linux-perf-users@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Howard Chu <howardchu95@gmail.com>,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
Michael Petlan <mpetlan@redhat.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] perf trace: Refactor augmented_raw_syscalls using bpf_loop
Date: Wed, 24 Jun 2026 12:24:31 -0700 [thread overview]
Message-ID: <ajwu7xR6V6MAQOFw@google.com> (raw)
In-Reply-To: <c2f4e45e-d5c9-42e9-a46b-25fb0cacb267@redhat.com>
On Wed, Jun 24, 2026 at 08:47:38AM +0200, Viktor Malik wrote:
> On 6/23/26 19:10, Namhyung Kim wrote:
> > Hello,
> >
> > On Tue, Jun 23, 2026 at 08:27:39AM -0700, Alexei Starovoitov wrote:
> >> On Tue Jun 23, 2026 at 4:25 AM PDT, Viktor Malik wrote:
[SNIP]
> >>> + struct args_loop_ctx loop_ctx = {
> >>> + .args = args,
> >>> + .beauty_map = beauty_map,
> >>> + .payload_offset = payload_offset,
> >>> + .value_size = value_size,
> >>> + .output = &output,
> >>> + .do_output = &do_output
> >>> + };
> >>> + iters = bpf_loop(6, process_arg_cb, &loop_ctx, 0);
> >>
> >> bpf_loop() is old and generally not recommended.
> >> Please use bpf_for() then the diff will be one line change and
> >> can scale to any number of args. Not just 6.
>
> Thanks Alexei, I didn't know about this preference.
>
> > One thing we should take care is to support old kernels. The oldest
> > LTS kernel in the kernel.org is 5.10 and bpf_loop() was introduced in
> > 5.17 and bpf_for (bpf_iter_num) was 6.4.
>
> The problematic loop was introduced in 6.12 by a68fd6a6cdd3 ("perf
> trace: Collect augmented data using BPF") so we should be good using
> bpf_for. Or is perf from 7.2 supposed to work on 5.10 LTS kernels?
Yep, we'd like to support old kernels.
Thanks,
Namhyung
prev parent reply other threads:[~2026-06-24 19:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 11:25 [PATCH] perf trace: Refactor augmented_raw_syscalls using bpf_loop Viktor Malik
2026-06-23 11:39 ` sashiko-bot
2026-06-23 15:27 ` Alexei Starovoitov
2026-06-23 17:10 ` Namhyung Kim
2026-06-24 6:47 ` Viktor Malik
2026-06-24 10:27 ` Viktor Malik
2026-06-24 17:19 ` Andrii Nakryiko
2026-06-24 19:24 ` Namhyung Kim [this message]
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=ajwu7xR6V6MAQOFw@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=howardchu95@gmail.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mpetlan@redhat.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=vmalik@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.