lkml.org 
[lkml]   [2022]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3] irq/core: synchronize irq_thread startup
Date
On Tue, May 03 2022 at 00:01, Hillf Danton wrote:
> On Mon, 02 May 2022 16:28:56 +0200 Thomas Gleixner wrote:
> --- upstream/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -1258,6 +1258,7 @@ static int irq_thread(void *data)
> struct irq_desc *desc = irq_to_desc(action->irq);
> irqreturn_t (*handler_fn)(struct irq_desc *desc,
> struct irqaction *action);
> + bool waked = false;
>
> sched_set_fifo(current);
>
> @@ -1282,8 +1283,11 @@ static int irq_thread(void *data)
> irq_wake_secondary(desc, action);
>
> wake_threads_waitq(desc);
> + waked = true;
> }
>
> + if (!waked)
> + wake_threads_waitq(desc);

That's a guarantee to make desc->threads_active go negative in the case
that the thread was never woken by a hard interrupt handler. IOW, you
created a new problem which did not exist before.

The problem discussed here is not a problem in irq_thread(), it's a
problem of not reaching this function in the first place. See the on
point analysis in Thomas Pfaffs patch.

Thanks,

tglx

\
 
 \ /
  Last update: 2022-05-02 21:25    [W:0.085 / U:2.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site