2012-05-18 04:55:32

by Ning Jiang

[permalink] [raw]
Subject: add IRQS_PENDING for nested, simple and level handler to early abort suspend operation

During suspend check_wakeup_irqs() will check IRQS_PENDING flag to
abort a suspend operation, however, this only applies for edge
triggered irq. Add IRQS_PENDING for nested, simple and level handler
to mimic the same behaviour as edge irq handler.

Without this optimization, level irq can be handled correctly but there
is some penalty. It has to go through a full run/suspend power cycle for level
irq to be detected and handled. With it, we can abort the suspend operation
earlier and thus shorten the interrupt latency.

I know this is ugly as IRQS_PENDING is intended for edge irq but I don't
know how to do it in a right way. Please enlighten me if you have better ideas.

Ning


Attachments:
0001-genirq-add-IRQS_PENDING-for-nested-simple-and-level-.patch (1.91 kB)

2012-05-18 07:55:21

by Thomas Gleixner

[permalink] [raw]
Subject: Re: add IRQS_PENDING for nested, simple and level handler to early abort suspend operation

On Fri, 18 May 2012, Ning Jiang wrote:

> During suspend check_wakeup_irqs() will check IRQS_PENDING flag to
> abort a suspend operation, however, this only applies for edge
> triggered irq. Add IRQS_PENDING for nested, simple and level handler
> to mimic the same behaviour as edge irq handler.
>
> Without this optimization, level irq can be handled correctly but there
> is some penalty. It has to go through a full run/suspend power cycle for level
> irq to be detected and handled. With it, we can abort the suspend operation
> earlier and thus shorten the interrupt latency.
>
> I know this is ugly as IRQS_PENDING is intended for edge irq but I don't
> know how to do it in a right way. Please enlighten me if you have better ideas.

First of all, please send patches inlined. Aside of that a similar
patch is queued in tip/irq/core commit d4dc0f90.

Thanks,

tglx

2012-05-18 09:45:07

by Ning Jiang

[permalink] [raw]
Subject: Re: add IRQS_PENDING for nested, simple and level handler to early abort suspend operation

Sorry that I didn't notice the patch in tip/irq/core. It did exactly
what I want. Forget about my patch. One more question: Do we need to
change handle_simple_irq and handle_nested_irq too?

Thanks,
Ning