Re: [PATCH RT 09/10] drm/i915/gt: Queue and wait for the irq_work item.

From: Steven Rostedt
Date: Tue Nov 23 2021 - 10:38:02 EST


On Tue, 23 Nov 2021 09:25:00 +0100
Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:

> On 2021-11-22 15:38:56 [-0500], Steven Rostedt wrote:
> > 5.10.78-rt56-rc2 stable review patch.
> > If anyone has any objections, please let me know.
>
> I don't mind releasing this as it is but could you please add the
> following irq-work patches:
>
> * 09089db79859c irq_work: Also rcuwait for !IRQ_WORK_HARD_IRQ on PREEMPT_RT

Is there something else missing here, as this gives the following rejects in
irq_work.c:

--- kernel/irq_work.c
+++ kernel/irq_work.c
@@ -217,7 +217,8 @@ void irq_work_single(void *arg)
*/
(void)atomic_cmpxchg(&work->node.a_flags, flags, flags & ~IRQ_WORK_BUSY);

- if (!arch_irq_work_has_interrupt())
+ if ((IS_ENABLED(CONFIG_PREEMPT_RT) && !irq_work_is_hard(work)) ||
+ !arch_irq_work_has_interrupt())
rcuwait_wake_up(&work->irqwait);
}

@@ -277,7 +278,8 @@ void irq_work_sync(struct irq_work *work)
lockdep_assert_irqs_enabled();
might_sleep();

- if (!arch_irq_work_has_interrupt()) {
+ if ((IS_ENABLED(CONFIG_PREEMPT_RT) && !irq_work_is_hard(work)) ||
+ !arch_irq_work_has_interrupt()) {
rcuwait_wait_event(&work->irqwait, !irq_work_is_busy(work),
TASK_UNINTERRUPTIBLE);
return;

And there's no test here, and no irq_work_is_hard() in 5.10-rt.

This is why I didn't add them.

-- Steve



> * b4c6f86ec2f64 irq_work: Handle some irq_work in a per-CPU thread on PREEMPT_RT
> * 810979682ccc9 irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support.
>
> in a follow-up release?
>
> Sebastian