BPF List
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Emil Tsalapatis" <emil@etsalapatis.com>, <bpf@vger.kernel.org>
Cc: <andrii@kernel.org>, <eddyz87@gmail.com>, <memxor@gmail.com>,
	<daniel@iogearbox.net>
Subject: Re: [PATCH bpf v2 1/2] bpf: Add sleepable arena page allocation path
Date: Thu, 24 Sep 2026 21:33:33 +0000	[thread overview]
Message-ID: <DLNVA9111IMS.2GQ5DERPDAH6I@gmail.com> (raw)
In-Reply-To: <20260924053621.7076-2-emil@etsalapatis.com>

On Thu, Sep 24, 2026 at 05:36 AM Emil Tsalapatis <emil@etsalapatis.com> wrote:
> Add a separate arena page allocation path just for sleepable callers.
> The path preallocates the arena memory to be added to the tree before
> taking the critical section.

Another idea...
can we drop pages[] and link the pages via page->pcp_llist
the way apply_range_clear_cb() does on the free side ?

Then both sleepable and non-sleepable allocate all pages before
taking the lock and there is no need for kvcalloc vs kmalloc_nolock,
batching, etc.
The whole function will probably be much simpler.

pw-bot: cr

  parent reply	other threads:[~2026-09-24 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  5:36 [PATCH bpf v2 0/2] Make sleepable arena paths use sleepable alloc_pages Emil Tsalapatis
2026-09-24  5:36 ` [PATCH bpf v2 1/2] bpf: Add sleepable arena page allocation path Emil Tsalapatis
2026-09-24  6:29   ` bot+bpf-ci
2026-09-24 18:29     ` Emil Tsalapatis
2026-09-24 10:11   ` Jiayuan Chen
2026-09-24 17:56     ` Emil Tsalapatis
2026-09-24 21:33   ` Alexei Starovoitov [this message]
2026-09-24 22:03     ` Emil Tsalapatis
2026-09-24  5:36 ` [PATCH bpf v2 2/2] selftests/bpf: Test large allocations for both sleepable/nonsleepable arena users Emil Tsalapatis

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=DLNVA9111IMS.2GQ5DERPDAH6I@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=memxor@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox