[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc0f1f19-f7e6-45d8-abff-a98305ce5bb7@kernel.dk>
Date: Mon, 24 Mar 2025 16:15:45 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Joe Damato <jdamato@...tly.com>, linux-fsdevel@...r.kernel.org
Cc: netdev@...r.kernel.org, brauner@...nel.org, asml.silence@...il.com,
hch@...radead.org, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
horms@...nel.org, Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH vfs/for-next 1/3] pipe: Move pipe wakeup helpers out of
splice
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@...nel.dk>
--
Jens Axboe
Powered by blists - more mailing lists