From: Hao Xu <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/2] io_uring: check tctx->in_idle when decrementing inflight_tracked
Date: Fri, 10 Dec 2021 15:21:03 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
在 2021/12/9 下午11:59, Jens Axboe 写道:
> If we have someone potentially waiting for tracked requests to finish,
> ensure that we check in_idle and wake them up appropriately.
>
> Cc: [email protected]
> Signed-off-by: Jens Axboe <[email protected]>
> ---
Hi Jens,
I saw every/several( in batching cases) io_clean_op() followed by an
io_put_task() which does the same thing
as this patch, so it seems this one is not neccessary? Correct me if I'm
wrong since I haven't touch this code for
a long time.
Regards,
Hao
> fs/io_uring.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index c4f217613f56..b4d5b8d168bf 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -6640,6 +6640,8 @@ static void io_clean_op(struct io_kiocb *req)
> struct io_uring_task *tctx = req->task->io_uring;
>
> atomic_dec(&tctx->inflight_tracked);
> + if (unlikely(atomic_read(&tctx->in_idle)))
> + wake_up(&tctx->wait);
> }
> if (req->flags & REQ_F_CREDS)
> put_cred(req->creds);
next prev parent reply other threads:[~2021-12-10 7:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 15:59 [PATCHSET 0/2] Cancelation fixes Jens Axboe
2021-12-09 15:59 ` [PATCH 1/2] io_uring: check tctx->in_idle when decrementing inflight_tracked Jens Axboe
2021-12-10 7:21 ` Hao Xu [this message]
2021-12-10 13:47 ` Jens Axboe
2021-12-09 15:59 ` [PATCH 2/2] io_uring: ensure task_work gets run as part of cancelations Jens Axboe
2021-12-09 16:16 ` [PATCH v2 " Jens Axboe
2021-12-10 3:29 ` Hao Xu
2021-12-10 4:22 ` Jens Axboe
2021-12-10 7:31 ` Hao Xu
2021-12-10 13:45 ` 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 \
--in-reply-to=2c527587-36c4-900b-bda6-1357d9bb5ba0@linux.alibaba.com \
[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