From: Leon Hwang <leon.hwang@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Song Liu <song@kernel.org>, Eddy Z <eddyz87@gmail.com>,
Quentin Monnet <qmo@kernel.org>, Daniel Xu <dxu@dxuuu.xyz>,
kernel-patches-bot@fb.com
Subject: Re: [RESEND PATCH bpf-next v2 1/4] bpf: Introduce global percpu data
Date: Mon, 24 Feb 2025 13:25:27 +0800 [thread overview]
Message-ID: <71ce2e8c-95db-4a41-9cda-c01bd6845678@linux.dev> (raw)
In-Reply-To: <CAADnVQLhw8PgS6vcOvceJvdUdazfi77tXj6n_w0b=gD1fwMFsw@mail.gmail.com>
On 2025/2/19 09:47, Alexei Starovoitov wrote:
> On Thu, Feb 13, 2025 at 8:19 AM Leon Hwang <leon.hwang@linux.dev> wrote:
>>
>>
>> +#ifdef CONFIG_SMP
>
> What happens on !SMP ?
> I think the code assumes that the verifier will adjust ld_imm64
> with percpu insn.
> On !SMP ld_imm64 will be pointing where?
If !SMP, ld_imm64 correctly loads the address from array->pptrs[0].
Therefore, adding a percpu instruction is unnecessary for !SMP, although
it would still function correctly in that case.
For SMP, a percpu instruction is inserted after ld_imm64 to ensure
proper handling.
Thanks,
Leon
next prev parent reply other threads:[~2025-02-24 5:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 16:19 [RESEND PATCH bpf-next v2 0/4] bpf: Introduce global percpu data Leon Hwang
2025-02-13 16:19 ` [RESEND PATCH bpf-next v2 1/4] " Leon Hwang
2025-02-19 1:47 ` Alexei Starovoitov
2025-02-24 5:25 ` Leon Hwang [this message]
2025-02-26 2:19 ` Hou Tao
2025-02-26 4:26 ` Hou Tao
2025-02-26 14:54 ` Leon Hwang
2025-02-26 15:31 ` Alexei Starovoitov
2025-02-26 16:12 ` Leon Hwang
2025-02-27 2:11 ` Hou Tao
2025-02-13 16:19 ` [RESEND PATCH bpf-next v2 2/4] bpf, libbpf: Support " Leon Hwang
2025-02-13 16:19 ` [RESEND PATCH bpf-next v2 3/4] bpf, bpftool: Generate skeleton for " Leon Hwang
2025-02-14 9:49 ` Leon Hwang
2025-02-13 16:19 ` [RESEND PATCH bpf-next v2 4/4] selftests/bpf: Add cases to test " Leon Hwang
2025-02-19 1:54 ` Alexei Starovoitov
2025-02-24 5:40 ` Leon Hwang
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=71ce2e8c-95db-4a41-9cda-c01bd6845678@linux.dev \
--to=leon.hwang@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=dxu@dxuuu.xyz \
--cc=eddyz87@gmail.com \
--cc=kernel-patches-bot@fb.com \
--cc=qmo@kernel.org \
--cc=song@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).