[RFC][PATCH 0/2] reworking cause_ipi and adding global doorbell support

Nicholas Piggin npiggin at gmail.com
Tue Mar 14 12:49:50 AEDT 2017


On Tue, 14 Mar 2017 10:31:08 +1100
Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:

> On Mon, 2017-03-13 at 03:13 +1000, Nicholas Piggin wrote:
> > Hi,
> > 
> > Just after the previous two fixes, I would like to propose changing
> > the way we do doorbell vs interrupt controller IPIs, and add support
> > for global doorbells supported by POWER9 in HV mode.
> > 
> > After this, the platform code knows about doorbells and interrupt
> > controller IPIs, rather than they know about each other.  
> 
> A few things come to mind:
> 
>  - We don't want to use doorbells under KVM. They are going to turn
> into traps and be emulated, slower than using H_IPI, at least on P9.
> Even for core only doorbells. I'm not sure how to convey that to the
> guest.

msgsndp will be okay, won't it? Guest just chooses that based on
HVMODE (which pseries platform knows is core only).

>  - On PP9 DD1 we need a CI load instead of msgsync (a DARN instruction
> would do too if it works)

Yes, Paul pointed this out too. I'll add an alt patch for it. Apparently
also msgsync needs lwsync afterwards for DD2.

> 
>  - Can we get rid of the atomic ops for manipulating the IPI mux ? What
> about a cache line per message and just set/clear ? If we clear in the
> doorbell handler before we call the respective targets, we shouldn't
> "lose" messages no ? As long as the actual handlers "loop" as necessary
> of course.

Yes I think that would work. Good idea. A single cacheline with messages
being independently stored bytes within it might work better, so the
receiver CPU does not have to go through and load multiple cachelines
to check for messages. It could load up to 8 message types with one load.

Thanks,
Nick


More information about the Linuxppc-dev mailing list