Re: [PATCH for-next v3 1/9] io_uring: io_req_complete_post should defer if available

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

 



On Thu, 2022-11-24 at 15:56 +0000, Pavel Begunkov wrote:
> On 11/24/22 09:35, Dylan Yudaken wrote:
> > For consistency always defer completion if specified in the issue
> > flags.
> > 
> > Signed-off-by: Dylan Yudaken <dylany@xxxxxxxx>
> > ---
> >   io_uring/io_uring.c | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
> > index cc27413129fc..ec23ebb63489 100644
> > --- a/io_uring/io_uring.c
> > +++ b/io_uring/io_uring.c
> > @@ -852,7 +852,9 @@ static void __io_req_complete_post(struct
> > io_kiocb *req)
> >   
> >   void io_req_complete_post(struct io_kiocb *req, unsigned
> > issue_flags)
> >   {
> > -       if (!(issue_flags & IO_URING_F_UNLOCKED) ||
> > +       if (issue_flags & IO_URING_F_COMPLETE_DEFER) {
> > +               io_req_complete_defer(req);
> > +       } else if (!(issue_flags & IO_URING_F_UNLOCKED) ||
> >             !(req->ctx->flags & IORING_SETUP_IOPOLL)) {
> >                 __io_req_complete_post(req);
> >         } else {
> 
> I think it's better to leave it and not impose a second meaning
> onto it. We can explicitly call io_req_complete_defer() in all
> places that require it, maybe with a new helper like
> io_req_complete()
> if needed.
> 

I think you may be right - I'll give it a try and send some clean up
patches.

Dylan





[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