Re: [PATCH v2] sched_ext: Use kvzalloc for large exit_dump allocation
From: Breno Leitao
Date: Tue Apr 08 2025 - 09:41:41 EST
On Tue, Apr 08, 2025 at 03:12:43PM +0200, Andrea Righi wrote:
> On Tue, Apr 08, 2025 at 05:17:16AM -0700, Breno Leitao wrote:
> > 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.
>
> I see, makes sense. Maybe we can rephrase this part to not mention the
> order=9 allocation and avoid potential confusion.
Sure! I will send a v3 later today, then.