On 10/23/21 10:46 AM, Pavel Begunkov wrote: > On 10/23/21 17:21, Pavel Begunkov wrote: >> With addition of __blkdev_direct_IO_async(), __blkdev_direct_IO() now >> serves only multio-bio I/O, which we don't poll. Now we can remove >> anything related to I/O polling from it. >> >> Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> >> --- >> block/fops.c | 20 +++----------------- >> 1 file changed, 3 insertions(+), 17 deletions(-) >> >> diff --git a/block/fops.c b/block/fops.c >> index 8800b0ad5c29..997904963a9d 100644 >> --- a/block/fops.c >> +++ b/block/fops.c >> @@ -190,7 +190,6 @@ static ssize_t __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, >> struct blk_plug plug; >> struct blkdev_dio *dio; >> struct bio *bio; >> - bool do_poll = (iocb->ki_flags & IOCB_HIPRI); >> bool is_read = (iov_iter_rw(iter) == READ), is_sync; >> loff_t pos = iocb->ki_pos; >> int ret = 0; >> @@ -216,12 +215,7 @@ static ssize_t __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, >> if (is_read && iter_is_iovec(iter)) >> dio->flags |= DIO_SHOULD_DIRTY; >> >> - /* >> - * Don't plug for HIPRI/polled IO, as those should go straight >> - * to issue >> - */ >> - if (!(iocb->ki_flags & IOCB_HIPRI)) >> - blk_start_plug(&plug); > > I'm not sure, do we want to leave it conditional here? For async polled there's only one user and that user plug already... -- Jens Axboe