From: Puranjay Mohan <puranjay12@gmail.com>
To: Song Liu <song@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Alexei Starovoitov <ast@kernel.org>,
Will Deacon <will@kernel.org>,
kernelci-results@groups.io, bot@kernelci.org,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
bpf@vger.kernel.org, linux-next@vger.kernel.org
Subject: Re: next/master bisection: baseline.login on qemu_arm64-virt-gicv3-uefi
Date: Fri, 8 Mar 2024 13:12:22 +0100 [thread overview]
Message-ID: <CANk7y0gwpy2oNBf4zoRYTHrY1TqMNDwOY61RvC9V3xKaG0=o5Q@mail.gmail.com> (raw)
In-Reply-To: <CAPhsuW4XtFn2Nb0hr9R5FAcNNYjHsT1khvF8mHSvZarT6bPdCQ@mail.gmail.com>
Hi Song,
>
> bpf_prog_pack gives benefits without using PMD pages. For arm64
> with 64kB page, even bpf_prog_pack of 64kB can fit multiple bpf
> programs in it. OTOH, 512MB is really big.
>
> How about we do something like the following?
>
> Thanks,
> Song
>
> diff --git i/kernel/bpf/core.c w/kernel/bpf/core.c
> index 9ee4536d0a09..1fe05c280e31 100644
> --- i/kernel/bpf/core.c
> +++ w/kernel/bpf/core.c
> @@ -888,7 +888,15 @@ static LIST_HEAD(pack_list);
> * CONFIG_MMU=n. Use PAGE_SIZE in these cases.
> */
> #ifdef PMD_SIZE
> -#define BPF_PROG_PACK_SIZE (PMD_SIZE * num_possible_nodes())
> + /* PMD_SIZE is really big for some archs. It doesn't make sense to
> + * reserve too much memory in one allocation. Cap BPF_PROG_PACK_SIZE to
> + * 2MiB * num_possible_nodes().
> + */
> + #if PMD_SIZE <= (1 << 21)
> + #define BPF_PROG_PACK_SIZE (PMD_SIZE * num_possible_nodes())
> + #else
> + #define BPF_PROG_PACK_SIZE ((1 << 21) * num_possible_nodes())
> + #endif
> #else
> #define BPF_PROG_PACK_SIZE PAGE_SIZE
> #endif
I have sent a patch with the above:
https://lore.kernel.org/all/20240308120712.88122-1-puranjay12@gmail.com/
Thanks for helping with this.
I have tested that this patch fixes this issue.
Thanks,
Puranjay
prev parent reply other threads:[~2024-03-08 12:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <65e9e748.a70a0220.606f7.53c0@mx.google.com>
2024-03-07 16:36 ` Mark Brown
2024-03-07 18:16 ` Song Liu
2024-03-07 18:34 ` Mark Brown
2024-03-07 19:02 ` Puranjay Mohan
2024-03-07 23:00 ` Song Liu
2024-03-08 12:12 ` Puranjay Mohan [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='CANk7y0gwpy2oNBf4zoRYTHrY1TqMNDwOY61RvC9V3xKaG0=o5Q@mail.gmail.com' \
--to=puranjay12@gmail.com \
--cc=ast@kernel.org \
--cc=bot@kernelci.org \
--cc=bpf@vger.kernel.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kernelci-results@groups.io \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=song@kernel.org \
--cc=will@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