Re: [PATCH v3 2/3] io_uring: don't do full *prep_worker() from io-wq

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

 



On 2/24/20 1:30 AM, Pavel Begunkov wrote:
> io_prep_async_worker() called io_wq_assign_next() do many useless checks:
> io_req_work_grab_env() was already called during prep, and @do_hashed
> is not ever used. Add io_prep_next_work() -- simplified version, that
> can be called io-wq.
> 
> Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
> ---
>  fs/io_uring.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 819661f49023..3003e767ced3 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -955,6 +955,17 @@ static inline void io_req_work_drop_env(struct io_kiocb *req)
>  	}
>  }
>  
> +static inline void io_prep_next_work(struct io_kiocb *req,
> +				     struct io_kiocb **link)
> +{
> +	const struct io_op_def *def = &io_op_defs[req->opcode];
> +
> +	if (!(req->flags & REQ_F_ISREG) && def->unbound_nonreg_file)
> +			req->work.flags |= IO_WQ_WORK_UNBOUND;

Extra tab?

Otherwise looks fine.

-- 
Jens Axboe




[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