Re: [PATCH v2] sched_ext: Use kvzalloc for large exit_dump allocation
From: Breno Leitao
Date: Tue Apr 08 2025 - 08:20:52 EST
Hello Andrea,
On Tue, Apr 08, 2025 at 01:30:32PM +0200, Andrea Righi wrote:
> Hi Breno,
>
> I already acked even the buggy version, so this one looks good. :)
>
> On Tue, Apr 08, 2025 at 04:09:02AM -0700, Breno Leitao wrote:
> > Replace kzalloc with kvzalloc for the exit_dump buffer allocation, which
> > can require large contiguous memory (up to order=9) depending on the
>
> BTW, from where this order=9 is coming from? exit_dump_len is 32K by
> default, but a BPF scheduler can arbitrarily set it to any value via
> ops->exit_dump_len, so it could be even bigger than an order 9 allocation.
You are absolutely correct, this allocation could be of any size.
I've got this problem because I was monitoring the Meta fleet, and saw
a bunch of allocation failures and decided to investigate. In this case
specifically, the users were using order=9 (512 pages), but, again, this
could be even bigger.
Thanks for the review,
--breno