Re: [PATCH RFC 0/4] fs/pipe: unify the page pools into a single per-pipe pool

From: Breno Leitao

Date: Fri Jul 03 2026 - 11:30:59 EST


Hello Christian,

On Fri, Jul 03, 2026 at 12:19:50PM +0200, Christian Brauner wrote:
> On 2026-06-26 03:26 -0700, Breno Leitao wrote:
> > TL;DR: This simplifies the pipe code, unify the page pools, reduce the
> > code by 11 lines, and improves the microbenchmark by up to 23% — so it's
> > probably wrong (!?).
> >
> > Summary:
> > =======
> >
> > I've spent some time converging tmp_page[] and the on-stack
> > anon_pipe_prealloc pool of pages into a single per-pipe pool, as
> > discussed previously in a few places, most recently at:
> >
> > https://lore.kernel.org/all/ajLA_zxsYyKISkwp@xxxxxxxxxx/
>
> I think this makes sense. Sashiko has some comments on missing trim for
> readers you might want to consider.

Thanks for looking at it.

Agreed, we want to trim on the reader side as well, otherwise we might
end up with more than 2 (current default) pages in the pipe structure.

I will update this RFC and resend as a v2.

--breno