Re: [PATCH v3 0/2] fs/pipe: reduce pipe->mutex contention by pre-allocating outside the lock
From: Breno Leitao
Date: Wed Jun 17 2026 - 10:49:40 EST
Hello Mateusz,
On Wed, Jun 17, 2026 at 04:37:24PM +0200, Oleg Nesterov wrote:
> On 06/17, Mateusz Guzik wrote:
> >
> > There are trivial touch ups which can be done by adding a bunch of
> > predicts and inlining kill_fasync if someone can be bothered.
>
> I was thinking about another change, see below. It assumes that in the
> likely case another writer won't steal the pages from ->tmp_page[]
> before we take pipe->mutex.
Do you think we could eventually eliminate the tmp_page[] array and
consolidate everything into the prealloc pages? That would unify the two
page pools currently used in the pipe write path.
When I examined this previously, it appeared non-trivial but potentially
feasible.
What is your view on it?
Thanks,
--breno