Re: [PATCH 5.11] io_uring: don't take fs for recvmsg/sendmsg

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

 



On 07/11/2020 13:20, Pavel Begunkov wrote:
> We don't even allow not plain data msg_control, which is disallowed in
> __sys_{send,revb}msg_sock(). So no need in fs for IORING_OP_SENDMSG and
> IORING_OP_RECVMSG. fs->lock is less contanged not as much as before, but
> there are cases that can be, e.g. IOSQE_ASYNC.

This one is still good to go. If anyone needs fs, etc. for msg_control,
IMHO it should be done in a different way not penalising others. 
i.e. grabbing it in io_prep_async_work().

> 
> Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
> ---
>  fs/io_uring.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 2e435b336927..8d721a652d61 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -849,8 +849,7 @@ static const struct io_op_def io_op_defs[] = {
>  		.pollout		= 1,
>  		.needs_async_data	= 1,
>  		.async_size		= sizeof(struct io_async_msghdr),
> -		.work_flags		= IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG |
> -						IO_WQ_WORK_FS,
> +		.work_flags		= IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG,
>  	},
>  	[IORING_OP_RECVMSG] = {
>  		.needs_file		= 1,
> @@ -859,8 +858,7 @@ static const struct io_op_def io_op_defs[] = {
>  		.buffer_select		= 1,
>  		.needs_async_data	= 1,
>  		.async_size		= sizeof(struct io_async_msghdr),
> -		.work_flags		= IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG |
> -						IO_WQ_WORK_FS,
> +		.work_flags		= IO_WQ_WORK_MM | IO_WQ_WORK_BLKCG,
>  	},
>  	[IORING_OP_TIMEOUT] = {
>  		.needs_async_data	= 1,
> 

-- 
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