io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: [PATCH 2/5] io_uring: don't inflight-track linked timeouts
Date: Sat, 14 Aug 2021 17:26:07 +0100	[thread overview]
Message-ID: <c1c1d3086dd08ff8acfaaa79ba7b06d111915cc6.1628957788.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1628957788.git.asml.silence@gmail.com>

Tracking linked timeouts as infligh was needed to make sure that io-wq
is not destroyed by io_uring_cancel_generic() racing with
io_async_cancel_one() accessing it. Now, cancellations issued by linked
timeouts are done in the task context, so it's already synchronised.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 fs/io_uring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 0d9a443d4987..d572a831cf85 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5699,8 +5699,6 @@ static int io_timeout_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe,
 
 	data->mode = io_translate_timeout_mode(flags);
 	hrtimer_init(&data->timer, CLOCK_MONOTONIC, data->mode);
-	if (is_timeout_link)
-		io_req_track_inflight(req);
 	return 0;
 }
 
-- 
2.32.0


  parent reply	other threads:[~2021-08-14 16:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 16:26 [PATCH for-next 0/5] 5.15 cleanups and optimisations Pavel Begunkov
2021-08-14 16:26 ` [PATCH 1/5] io_uring: optimise iowq refcounting Pavel Begunkov
2021-08-14 19:13   ` Jens Axboe
2021-08-14 19:31     ` Pavel Begunkov
2021-08-14 19:36       ` Pavel Begunkov
2021-08-14 19:38         ` Jens Axboe
2021-08-15  9:41           ` Pavel Begunkov
2021-08-15 15:01             ` Jens Axboe
2021-08-14 19:37       ` Jens Axboe
2021-08-14 16:26 ` Pavel Begunkov [this message]
2021-08-14 16:26 ` [PATCH 3/5] io_uring: optimise initial ltimeout refcounting Pavel Begunkov
2021-08-14 16:26 ` [PATCH 4/5] io_uring: kill not necessary resubmit switch Pavel Begunkov
2021-08-14 16:26 ` [PATCH 5/5] io_uring: deduplicate cancellations Pavel Begunkov

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=c1c1d3086dd08ff8acfaaa79ba7b06d111915cc6.1628957788.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).