linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers
@ 2017-04-13  9:45 Nicholas Piggin
  2017-04-13 13:31 ` Michael Ellerman
  2017-04-21  4:09 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Nicholas Piggin @ 2017-04-13  9:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin, Paul Mackerras

Hypervisor Virtualization and Directed Hypervisor Doorbell interrupt
handlers use the macro EXC_VIRT_OOL_MASKABLE_HV for their relocation-on
handlers, which calls MASKABLE_RELON_EXCEPTION_HV_OOL, which uses the
real mode interrupt prolog.

Use the RELON variant instead to reduce overhead.

Fixes: 1707dd1613 ("powerpc: Save CFAR before branching in interrupt entry paths")
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---

I was hesitant about using the Fixes: tag on this one because it's not
a correctness bug as far as I can see.

Thanks,
Nick

 arch/powerpc/include/asm/exception-64s.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index 14752eee3d0c..b89c91e27dd0 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -522,7 +522,7 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
 
 #define MASKABLE_RELON_EXCEPTION_HV_OOL(vec, label)			\
 	EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_TEST_HV, vec);		\
-	EXCEPTION_PROLOG_PSERIES_1(label, EXC_HV)
+	EXCEPTION_RELON_PROLOG_PSERIES_1(label, EXC_HV)
 
 /*
  * Our exception common code can be passed various "additions"
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers
  2017-04-13  9:45 [PATCH] powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers Nicholas Piggin
@ 2017-04-13 13:31 ` Michael Ellerman
  2017-04-15 10:31   ` Nicholas Piggin
  2017-04-21  4:09 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2017-04-13 13:31 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Paul Mackerras, Nicholas Piggin

Nicholas Piggin <npiggin@gmail.com> writes:

> Hypervisor Virtualization and Directed Hypervisor Doorbell interrupt
> handlers use the macro EXC_VIRT_OOL_MASKABLE_HV for their relocation-on
> handlers, which calls MASKABLE_RELON_EXCEPTION_HV_OOL, which uses the
> real mode interrupt prolog.
>
> Use the RELON variant instead to reduce overhead.
>
> Fixes: 1707dd1613 ("powerpc: Save CFAR before branching in interrupt entry paths")
> Cc: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>
> I was hesitant about using the Fixes: tag on this one because it's not
> a correctness bug as far as I can see.

Fixes can just mean "if you have this other commit you'll most likely
want this one too".

You can clarify the degree of Fixness in the change log, which then
allows a backporter to decide if they want it or not.

In this case I think it's entirely right, this is a fairly unfortunate
bug from a performance point of view if I'm reading it right.

cheers

> diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
> index 14752eee3d0c..b89c91e27dd0 100644
> --- a/arch/powerpc/include/asm/exception-64s.h
> +++ b/arch/powerpc/include/asm/exception-64s.h
> @@ -522,7 +522,7 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
>  
>  #define MASKABLE_RELON_EXCEPTION_HV_OOL(vec, label)			\
>  	EXCEPTION_PROLOG_1(PACA_EXGEN, SOFTEN_TEST_HV, vec);		\
> -	EXCEPTION_PROLOG_PSERIES_1(label, EXC_HV)
> +	EXCEPTION_RELON_PROLOG_PSERIES_1(label, EXC_HV)
>  
>  /*
>   * Our exception common code can be passed various "additions"
> -- 
> 2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers
  2017-04-13 13:31 ` Michael Ellerman
@ 2017-04-15 10:31   ` Nicholas Piggin
  0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Piggin @ 2017-04-15 10:31 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras

On Thu, 13 Apr 2017 23:31:23 +1000
Michael Ellerman <mpe@ellerman.id.au> wrote:

> Nicholas Piggin <npiggin@gmail.com> writes:
> 
> > Hypervisor Virtualization and Directed Hypervisor Doorbell interrupt
> > handlers use the macro EXC_VIRT_OOL_MASKABLE_HV for their relocation-on
> > handlers, which calls MASKABLE_RELON_EXCEPTION_HV_OOL, which uses the
> > real mode interrupt prolog.
> >
> > Use the RELON variant instead to reduce overhead.
> >
> > Fixes: 1707dd1613 ("powerpc: Save CFAR before branching in interrupt entry paths")
> > Cc: Paul Mackerras <paulus@samba.org>
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> >
> > I was hesitant about using the Fixes: tag on this one because it's not
> > a correctness bug as far as I can see.  
> 
> Fixes can just mean "if you have this other commit you'll most likely
> want this one too".
> 
> You can clarify the degree of Fixness in the change log, which then
> allows a backporter to decide if they want it or not.
> 
> In this case I think it's entirely right, this is a fairly unfortunate
> bug from a performance point of view if I'm reading it right.

Okay, makes sense. For POWER8 it only affects doorbell IPIs. Context switch
microbenchmark between threads with snooze disabled (which causes IPI) gets
about 3% faster, about 370 cycles. Should be more important on POWER9 with
global doorbells and HVI for host interrupts.

Thanks,
Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers
  2017-04-13  9:45 [PATCH] powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers Nicholas Piggin
  2017-04-13 13:31 ` Michael Ellerman
@ 2017-04-21  4:09 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-04-21  4:09 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Paul Mackerras, Nicholas Piggin

On Thu, 2017-04-13 at 09:45:48 UTC, Nicholas Piggin wrote:
> Hypervisor Virtualization and Directed Hypervisor Doorbell interrupt
> handlers use the macro EXC_VIRT_OOL_MASKABLE_HV for their relocation-on
> handlers, which calls MASKABLE_RELON_EXCEPTION_HV_OOL, which uses the
> real mode interrupt prolog.
> 
> Use the RELON variant instead to reduce overhead.
> 
> Fixes: 1707dd1613 ("powerpc: Save CFAR before branching in interrupt entry paths")
> Cc: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/a050d20d024dc3e1b988e715e2d811

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-21  4:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-13  9:45 [PATCH] powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers Nicholas Piggin
2017-04-13 13:31 ` Michael Ellerman
2017-04-15 10:31   ` Nicholas Piggin
2017-04-21  4:09 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).