Re: [PATCH for-next 5/7] io_uring: add IORING_SETUP_DEFER_TASKRUN

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

 



On Mon, 2022-08-15 at 15:02 +0100, Pavel Begunkov wrote:
> > -               if ((flags & IORING_ENTER_GETEVENTS) && ctx-
> > >syscall_iopoll)
> > +
> > +               if (!(flags & IORING_ENTER_GETEVENTS))
> > +                       mutex_unlock(&ctx->uring_lock);
> > +               else if (ctx->syscall_iopoll)
> >                         goto iopoll_locked;
> > -               mutex_unlock(&ctx->uring_lock);
> > -               io_run_task_work();
> > +               else
> > +                       io_run_task_work_unlock_ctx(ctx);
> 
> Let's unroll this function and get rid of conditional
> locking, especially since you don't need the io_run_task_work()
> part here.

I am struggling to figure out how to do this cleanly in v2 as I don't
want to break the existing codepath that skips the unlock/lock for
iopoll.

I'll post v2 anyway - but please let me know if my solution isn't what
you were thinking

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