From: Yonghong Song <yonghong.song@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Kernel Team <kernel-team@fb.com>,
Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH bpf-next v2 2/2] [no_merge] selftests/bpf: Benchmark runtime performance with private stack
Date: Thu, 18 Jul 2024 19:21:51 -0700 [thread overview]
Message-ID: <66b5c1ea-d945-4d72-8003-e807452918fa@linux.dev> (raw)
In-Reply-To: <CAADnVQJ_-FR45o89SWJWZPD4+A+AEArJf1Pjw41=9f0+Ujzg+g@mail.gmail.com>
On 7/18/24 5:36 PM, Alexei Starovoitov wrote:
> On Thu, Jul 18, 2024 at 2:44 PM Yonghong Song <yonghong.song@linux.dev> wrote:
>>
>>> $ perf record -- ./bench -w3 -d10 -a --nr-batch-iters=4096 private-stack
>>> 18.94% bench [k]
>>> 16.88% bench bpf_prog_bcf7977d3b93787c_func1 [k] bpf_prog_bcf7977d3b93787c_func1
>>> 15.77% bench bpf_trampoline_6442522961 [k]
> ...
>
>>> NOTE: I tried 6.4 perf and 6.10 perf, both of which have issues. I will investigate this further.
>> I tried with perf built with latest bpf-next and with no-private-stack, the issue still
>> exists. Will debug more.
> Try this fix:
> https://lore.kernel.org/all/20240714065533.1112616-1-houtao@huaweicloud.com/
It does fix the problem. The 'perf report' for private-stack flavor:
18.94% bench bpf_prog_71f1b7d5309b304a_bench_trigger_fentry_batch [k] bpf_prog_71f1b7d5309b304a_bench_trigger_fentry_batch
16.50% bench bpf_prog_bcf7977d3b93787c_func1 [k] bpf_prog_bcf7977d3b93787c_func1
15.75% bench bpf_trampoline_6442522961 [k] bpf_trampoline_6442522961
11.72% bench [kernel.vmlinux] [k] migrate_enable
11.63% bench [kernel.vmlinux] [k] __bpf_prog_enter_recur
11.37% bench [kernel.vmlinux] [k] __bpf_prog_exit_recur
6.17% bench [kernel.vmlinux] [k] migrate_disable
3.59% bench bpf_prog_d9703036495d54b0_trigger_driver [k] bpf_prog_d9703036495d54b0_trigger_driver
3.51% bench [kernel.vmlinux] [k] bpf_get_numa_node_id
0.05% bench bench [.] bpf_prog_test_run_opts
>
> btw you were cc-ed on it. your @ fb goes to spam ? ;)
It is in my inbox. Sadly I skipped it since it is for perf system and I focused on
several of my patches in the last few days.
next prev parent reply other threads:[~2024-07-19 2:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 20:51 [PATCH bpf-next v2 1/2] bpf: Support private stack for bpf progs Yonghong Song
2024-07-18 20:52 ` [PATCH bpf-next v2 2/2] [no_merge] selftests/bpf: Benchmark runtime performance with private stack Yonghong Song
2024-07-18 21:44 ` Yonghong Song
2024-07-18 21:59 ` Kumar Kartikeya Dwivedi
2024-07-19 3:01 ` Yonghong Song
2024-07-19 0:36 ` Alexei Starovoitov
2024-07-19 2:21 ` Yonghong Song [this message]
2024-07-20 0:14 ` bot+bpf-ci
2024-07-20 1:08 ` Alexei Starovoitov
2024-07-22 16:33 ` Yonghong Song
2024-07-20 3:28 ` [PATCH bpf-next v2 1/2] bpf: Support private stack for bpf progs Andrii Nakryiko
2024-07-22 16:43 ` Yonghong Song
2024-07-24 5:08 ` Yonghong Song
2024-07-24 16:54 ` Alexei Starovoitov
2024-07-24 17:56 ` Yonghong Song
2024-07-22 20:57 ` Andrii Nakryiko
2024-07-23 1:05 ` Alexei Starovoitov
2024-07-23 3:26 ` Andrii Nakryiko
2024-07-24 3:17 ` Alexei Starovoitov
2024-07-24 4:06 ` Andrii Nakryiko
2024-07-24 4:46 ` Yonghong Song
2024-07-24 4:32 ` Yonghong Song
2024-07-23 5:30 ` Yonghong Song
2024-07-23 7:02 ` Yonghong Song
2024-07-22 3:33 ` Eduard Zingerman
2024-07-22 16:54 ` Yonghong Song
2024-07-22 17:53 ` Eduard Zingerman
2024-07-22 17:51 ` Alexei Starovoitov
2024-07-22 18:22 ` Eduard Zingerman
2024-07-22 20:08 ` Alexei Starovoitov
2024-07-24 21:28 ` Yonghong Song
2024-07-25 4:55 ` Alexei Starovoitov
2024-07-25 17:20 ` Eduard Zingerman
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=66b5c1ea-d945-4d72-8003-e807452918fa@linux.dev \
--to=yonghong.song@linux.dev \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
/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