From: "tip-bot2 for Nam Cao" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Nam Cao <namcao@linutronix.de>,
Thomas Gleixner <tglx@linutronix.de>,
Jens Axboe <axboe@kernel.dk>,
":"@tip-bot2.tec.linutronix.de, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip: timers/core] io_uring: Remove redundant hrtimer's callback function setup
Date: Thu, 07 Nov 2024 01:59:44 -0000 [thread overview]
Message-ID: <173094478488.32228.3520314238506969137.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3C07b28dfd5691478a2d250f379c8b90dd37f9bb9a=2E17303?= =?utf-8?q?86209=2Egit=2Enamcao=40linutronix=2Ede=3E?=
The following commit has been merged into the timers/core branch of tip:
Commit-ID: c95d36585b9f8c43a4c5d5a9fe22477a138b63f4
Gitweb: https://git.kernel.org/tip/c95d36585b9f8c43a4c5d5a9fe22477a138b63f4
Author: Nam Cao <namcao@linutronix.de>
AuthorDate: Thu, 31 Oct 2024 16:14:19 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 07 Nov 2024 02:47:05 +01:00
io_uring: Remove redundant hrtimer's callback function setup
The IORING_OP_TIMEOUT command uses hrtimer underneath. The timer's callback
function is setup in io_timeout(), and then the callback function is setup
again when the timer is rearmed.
Since the callback function is the same for both cases, the latter setup is
redundant, therefore remove it.
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk:
Link: https://lore.kernel.org/all/07b28dfd5691478a2d250f379c8b90dd37f9bb9a.1730386209.git.namcao@linutronix.de
---
io_uring/timeout.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/io_uring/timeout.c b/io_uring/timeout.c
index 9973876..2ffe5e1 100644
--- a/io_uring/timeout.c
+++ b/io_uring/timeout.c
@@ -76,7 +76,6 @@ static void io_timeout_complete(struct io_kiocb *req, struct io_tw_state *ts)
/* re-arm timer */
spin_lock_irq(&ctx->timeout_lock);
list_add(&timeout->list, ctx->timeout_list.prev);
- data->timer.function = io_timeout_fn;
hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), data->mode);
spin_unlock_irq(&ctx->timeout_lock);
return;
reply other threads:[~2024-11-07 1:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=173094478488.32228.3520314238506969137.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=":"@tip-bot2.tec.linutronix.de \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=namcao@linutronix.de \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®