From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Austin Schuh <austin.linux@gmail.com>
Cc: axboe@kernel.dk, io-uring@vger.kernel.org,
linux-rt-devel@lists.linux.dev, clrkwllms@kernel.org,
rostedt@goodmis.org, tglx@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring/wait: wake real-time waiters from hard interrupt context
Date: Sat, 17 Oct 2026 17:19:45 +0200 [thread overview]
Message-ID: <20261017151945.q-LijyqZ@linutronix.de> (raw)
In-Reply-To: <20261017013303.3919170-1-austin.linux@gmail.com>
On 2026-10-16 18:33:03 [-0700], Austin Schuh wrote:
> --- a/io_uring/wait.c
> +++ b/io_uring/wait.c
> @@ -120,23 +121,39 @@ static enum hrtimer_restart io_cqring_min_timer_wakeup(struct hrtimer *timer)
> return io_cqring_timer_wakeup(timer);
> }
>
> +/*
> + * On PREEMPT_RT, hrtimers not marked for hard interrupt expiry expire in the
> + * ktimers thread, at the lowest real-time priority, so a real-time waiter
> + * isn't woken until every runnable real-time task on its CPU has blocked.
> + * Like hrtimer sleepers (see __hrtimer_setup_sleeper()), expire the timer in
> + * hard interrupt context if the waiter is a real-time task. Both callbacks
> + * only look at the ring and wake the task, which is safe there.
Please simply refer to __hrtimer_setup_sleeper() for the policy.
> + */
> +static enum hrtimer_mode io_cqring_timer_mode(void)
> +{
> + if (IS_ENABLED(CONFIG_PREEMPT_RT) && rt_or_dl_task_policy(current))
> + return HRTIMER_MODE_ABS_HARD;
> + return HRTIMER_MODE_ABS;
> +}
Sebastian
prev parent reply other threads:[~2026-10-17 15:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 1:33 Austin Schuh
2026-10-17 15:19 ` Sebastian Andrzej Siewior [this message]
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=20261017151945.q-LijyqZ@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=austin.linux@gmail.com \
--cc=axboe@kernel.dk \
--cc=clrkwllms@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=rostedt@goodmis.org \
--cc=tglx@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®