mbox series

[0/3] some pipe + wait stuff

Message ID 20250303230409.452687-1-mjguzik@gmail.com (mailing list archive)
Headers show
Series some pipe + wait stuff | expand

Message

Mateusz Guzik March 3, 2025, 11:04 p.m. UTC
As a side effect of looking at the pipe hang I came up with 3 changes to
consider for -next.

The first one is a trivial clean up which I wont mind if it merely gets
folded into someone else's change for pipes.

The second one reduces page alloc/free calls for the backing area (60%
less during a kernel build in my testing). I already posted this, but
the cc list was not proper.

The last one concerns the wait/wakeup mechanism and drops one lock trip
in the common case after waking up. That too was posted some days ago,
but nobody was biting. Perhaps you will be interested (but again, maybe
I got the wrong people from get_maintainer.pl).

Mateusz Guzik (3):
  pipe: drop an always true check in anon_pipe_write()
  pipe: cache 2 pages instead of 1
  wait: avoid spurious calls to prepare_to_wait_event() in
    ___wait_event()

 fs/pipe.c                 | 63 +++++++++++++++++++++++++--------------
 include/linux/pipe_fs_i.h |  2 +-
 include/linux/wait.h      |  3 ++
 3 files changed, 45 insertions(+), 23 deletions(-)

Comments

Christian Brauner March 4, 2025, 8:46 a.m. UTC | #1
On Tue, 04 Mar 2025 00:04:06 +0100, Mateusz Guzik wrote:
> As a side effect of looking at the pipe hang I came up with 3 changes to
> consider for -next.
> 
> The first one is a trivial clean up which I wont mind if it merely gets
> folded into someone else's change for pipes.
> 
> The second one reduces page alloc/free calls for the backing area (60%
> less during a kernel build in my testing). I already posted this, but
> the cc list was not proper.
> 
> [...]

This looks sane to me.
Would be good to get an Ack from Peter on the wait change.

---

Applied to the vfs-6.15.pipe branch of the vfs/vfs.git tree.
Patches in the vfs-6.15.pipe branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.15.pipe

[1/3] pipe: drop an always true check in anon_pipe_write()
      https://git.kernel.org/vfs/vfs/c/a40cd5849dab
[2/3] pipe: cache 2 pages instead of 1
      https://git.kernel.org/vfs/vfs/c/46af8e2406c2
[3/3] wait: avoid spurious calls to prepare_to_wait_event() in ___wait_event()
      https://git.kernel.org/vfs/vfs/c/84654c7f4730