public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: Re: [PATCH 5.11] io_uring: don't take fs for recvmsg/sendmsg
Date: Sun, 15 Nov 2020 13:07:58 +0000	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <a09e69abbe0382f5842cd0a69e51fab100aa988c.1604754488.git.asml.silence@gmail.com>

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 <[email protected]>
> ---
>  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

  parent reply	other threads:[~2020-11-15 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-07 13:20 [PATCH 5.11] io_uring: don't take fs for recvmsg/sendmsg Pavel Begunkov
2020-11-07 13:46 ` Stefan Metzmacher
2020-11-07 16:02   ` Pavel Begunkov
2020-11-07 16:07     ` Pavel Begunkov
2020-11-18 16:27       ` Stefan Metzmacher
2020-11-18 16:57         ` Stefan Metzmacher
2020-11-18 19:50           ` Pavel Begunkov
2020-11-19  9:17             ` Stefan Metzmacher
2020-11-15 13:07 ` Pavel Begunkov [this message]
2020-11-16 16:31 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox