[PATCH 1/4] powerpc/book3e: introduce external_input_edge exception handler for 64bit kernel

Kevin Hao haokexin at gmail.com
Thu May 16 18:43:29 EST 2013


On Wed, May 15, 2013 at 04:30:26PM -0500, Scott Wood wrote:
> On 05/13/2013 09:03:17 PM, Kevin Hao wrote:
> >On Mon, May 13, 2013 at 10:47:17AM -0500, Scott Wood wrote:
> >> On 05/11/2013 06:26:21 PM, Kevin Hao wrote:
> >> >In the external proxy facility mode, the interrupt is automatically
> >> >acknowledged with the same effect as reading the IACK register. So
> >> >this makes external input interrupt more like edge sensitive. That
> >> >means we can leave the irq hard enabled when it occurs with irq
> >soft
> >> >disabled just like the dec and doorbell interrupt. But the External
> >> >Proxy Register(EPR) is only considered valid from the time that the
> >> >external interrupt occurs until MSR[EE] is set to 1. So we have to
> >> >save the EPR before irq hard enabled.
> >>
> >> Is it really worth it?
> >
> >Maybe. :-)
> >Compare with the current kernel:
> >  * The overhead is that we need additional load & store the
> >contents of
> >    the EPR from/to PACA.
> 
> There's also mental overhead of the extra complexity.

Yes, I agree. But since we already have the support for the edge sensitive
interrupt such as doorbell, decrementer, adding another one doesn't really
introduce much code complexity in my opinion.

>  The lazy EE
> stuff is already fiddly enough (e.g. the recent KVM patches).

:-)

> 
> >  * The bonus is we keep the irq hard enabled when a external
> >interrupt occurs
> >    with irq soft-disabled. As I know we should leave the irq hard
> >enabled as
> >    much as possible. This is also the primary reason that we
> >introduce the
> >    Lazy EE.
> 
> I don't think "as much as possible" is a good way to look at it, so
> much as "as much as is practical", balanced by also wanting to keep
> the code as simple as is practical.

Yes, I also like simple. That is why I make the following patch first.
http://patchwork.ozlabs.org/patch/235530/

But it seems that Ben doesn't like it. And it also seem not so difficulty
to support the external interrupt as edge sensitive for external proxy,
so I scratch these patches. It seems that you and Ben have different
view about this issue. Anyway I have no strong preference for these two
ways and will leave it to you guys to determine which way we like to adopt.

Thanks,
Kevin

> 
> -Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20130516/77fe32de/attachment.sig>


More information about the Linuxppc-dev mailing list