]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pipe: cache 2 pages instead of 1
authorMateusz Guzik <mjguzik@gmail.com>
Mon, 3 Mar 2025 23:04:08 +0000 (00:04 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 4 Mar 2025 08:46:07 +0000 (09:46 +0100)
commit46af8e2406c27cc2f21094983697ff872102065f
treeecbf7233cedd550ffbb53f101214c8b222069539
parenta40cd5849dab4906f54f27e28561bd9298455bcf
pipe: cache 2 pages instead of 1

User data is kept in a circular buffer backed by pages allocated as
needed. Only having space for one spare is still prone to having to
resort to allocation / freeing.

In my testing this decreases page allocs by 60% during a kernel build.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20250303230409.452687-3-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/pipe.c
include/linux/pipe_fs_i.h