Re: [PATCH] mm/filemap: Implement fast short reads

From: Linus Torvalds

Date: Tue Oct 21 2025 - 11:50:39 EST


On Mon, 20 Oct 2025 at 01:33, Kiryl Shutsemau <kirill@xxxxxxxxxxxxx> wrote:
>
> On Sun, Oct 19, 2025 at 09:53:28PM -0700, Andrew Morton wrote:
> >
> > A use case for alloca() or equiv. That would improve the average-case
> > stack depth but not the worst-case.
>
> __kstack_alloca()/__builtin_alloca() would work and it bypassed
> -Wframe-larger-than warning.
>
> But I don't see any real users.

Yes, and we've walked away from alloca() (and on-stack VLAs, which are
really exactly the same thing as far as a compiler is concerned),
because it makes static analysis much *MUCH* harder.

Let's not ever re-introduce dynamic stack use in the kernel.

Linus