From: Jens Axboe <axboe@kernel.dk>
To: Joe Damato <jdamato@fastly.com>, linux-fsdevel@vger.kernel.org
Cc: netdev@vger.kernel.org, brauner@kernel.org,
asml.silence@gmail.com, hch@infradead.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH vfs/for-next 1/3] pipe: Move pipe wakeup helpers out of splice
Date: Mon, 24 Mar 2025 16:15:45 -0600 [thread overview]
Message-ID: <fc0f1f19-f7e6-45d8-abff-a98305ce5bb7@kernel.dk> (raw)
In-Reply-To: <20250322203558.206411-2-jdamato@fastly.com>
On 3/22/25 2:35 PM, Joe Damato wrote:
> Splice code has helpers to wakeup pipe readers and writers. Move these
> helpers out of splice, rename them from "wakeup_pipe_*" to
> "pipe_wakeup_*" and update call sites in splice.
This looks good to me, as it's moving the code to where it belongs.
One minor note:
> +void pipe_wakeup_readers(struct pipe_inode_info *pipe)
> +{
> + smp_mb();
> + if (waitqueue_active(&pipe->rd_wait))
> + wake_up_interruptible(&pipe->rd_wait);
> + kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
> +}
> +
> +void pipe_wakeup_writers(struct pipe_inode_info *pipe)
> +{
> + smp_mb();
> + if (waitqueue_active(&pipe->wr_wait))
> + wake_up_interruptible(&pipe->wr_wait);
> + kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
> +}
Both of these really should use wq_has_sleeper() - not related to your
change, as it makes more sense to keep the code while moving it. But
just spotted it while looking at it, just a note for the future... In
any case:
Reviewed-by: Jens Axboe <axboe@kernel.dk>
--
Jens Axboe
next prev parent reply other threads:[~2025-03-24 22:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-22 20:35 [PATCH vfs/for-next 0/3] Move splice_to_socket to net/socket.c Joe Damato
2025-03-22 20:35 ` [PATCH vfs/for-next 1/3] pipe: Move pipe wakeup helpers out of splice Joe Damato
2025-03-24 22:15 ` Jens Axboe [this message]
2025-03-22 20:35 ` [PATCH vfs/for-next 2/3] splice: Move splice_to_socket to net/socket.c Joe Damato
2025-03-24 21:15 ` Jakub Kicinski
2025-03-24 22:53 ` Joe Damato
2025-03-25 14:40 ` Christian Brauner
2025-03-22 20:35 ` [PATCH vfs/for-next 3/3] net: splice_to_socket: RCT declaration cleanup Joe Damato
2025-03-24 22:14 ` [PATCH vfs/for-next 0/3] Move splice_to_socket to net/socket.c Jens Axboe
2025-03-24 22:51 ` Joe Damato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc0f1f19-f7e6-45d8-abff-a98305ce5bb7@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=brauner@kernel.org \
--cc=edumazet@google.com \
--cc=hch@infradead.org \
--cc=horms@kernel.org \
--cc=jack@suse.cz \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).