Re: [PATCH 7/8] io_uring: arm poll for non-nowait files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/16/21 23:57, Noah Goldstein wrote:
On Sat, Oct 16, 2021 at 5:19 PM Pavel Begunkov <asml.silence@xxxxxxxxx> wrote:
@@ -3238,7 +3220,8 @@ static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter)
          */
         if (kiocb->ki_flags & IOCB_HIPRI)
                 return -EOPNOTSUPP;
-       if (kiocb->ki_flags & IOCB_NOWAIT)
+       if ((kiocb->ki_flags & IOCB_NOWAIT) &&
+           !(kiocb->ki_filp->f_flags & O_NONBLOCK))
                 return -EAGAIN;

Instead of 2x branches on what appears to be the error (not hot path)

The whole loop_rw_iter() is a slow path, we don't care enough

--
Pavel Begunkov



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux