From: Song Liu <songliubraving@fb.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Song Liu <song@kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ast@kernel.org" <ast@kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"andrii@kernel.org" <andrii@kernel.org>,
Kernel Team <Kernel-team@fb.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v4 bpf-next 2/7] bpf: use bytes instead of pages for bpf_jit_[charge|uncharge]_modmem
Date: Thu, 20 Jan 2022 04:45:21 +0000 [thread overview]
Message-ID: <24FE334F-1867-46A0-BB21-F10551CB1772@fb.com> (raw)
In-Reply-To: <20220120041025.uhg2mgpgl32mnjtq@ast-mbp.dhcp.thefacebook.com>
> On Jan 19, 2022, at 8:10 PM, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
>
> On Wed, Jan 19, 2022 at 03:06:15PM -0800, Song Liu wrote:
>> From: Song Liu <songliubraving@fb.com>
>>
>> This enables sub-page memory charge and allocation.
>>
>> Signed-off-by: Song Liu <songliubraving@fb.com>
>>
[...]
>> @@ -808,7 +808,7 @@ int bpf_jit_add_poke_descriptor(struct bpf_prog *prog,
>> return slot;
>> }
>>
>> -static atomic_long_t bpf_jit_current;
>> +static atomic64_t bpf_jit_current;
>
> I don't understand the motivation for this change.
> bpf_jit_limit is type "long" and it's counting in bytes.
> So why change jit_current to atomic64?
> atomic_long will be fine even on 32-bit arch.
> What did I miss?
Hmm.. I think you are right. I guess I missed the fact that we use
long bpf_jit_limit. Will remove this change in the next version.
Thanks,
Song
next prev parent reply other threads:[~2022-01-20 4:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 23:06 [PATCH v4 bpf-next 0/7] bpf_prog_pack allocator Song Liu
2022-01-19 23:06 ` [PATCH v4 bpf-next 1/7] x86/Kconfig: select HAVE_ARCH_HUGE_VMALLOC with HAVE_ARCH_HUGE_VMAP Song Liu
2022-01-19 23:06 ` [PATCH v4 bpf-next 2/7] bpf: use bytes instead of pages for bpf_jit_[charge|uncharge]_modmem Song Liu
2022-01-20 4:10 ` Alexei Starovoitov
2022-01-20 4:45 ` Song Liu [this message]
2022-01-19 23:06 ` [PATCH v4 bpf-next 3/7] bpf: use size instead of pages in bpf_binary_header Song Liu
2022-01-19 23:06 ` [PATCH v4 bpf-next 4/7] bpf: add a pointer of bpf_binary_header to bpf_prog Song Liu
2022-01-19 23:06 ` [PATCH v4 bpf-next 5/7] x86/alternative: introduce text_poke_copy Song Liu
2022-01-19 23:06 ` [PATCH v4 bpf-next 6/7] bpf: introduce bpf_prog_pack allocator Song Liu
2022-01-20 4:14 ` Alexei Starovoitov
2022-01-20 4:48 ` Song Liu
2022-01-20 4:50 ` Alexei Starovoitov
2022-01-19 23:06 ` [PATCH v4 bpf-next 7/7] bpf, x86_64: use " Song Liu
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=24FE334F-1867-46A0-BB21-F10551CB1772@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=song@kernel.org \
--cc=x86@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
all inboxes | Powered by JetHome®