Re: [PATCH 0/2] KVM: s390: avoid jump tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 8 Feb 2018 11:09:15 +0100
Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote:

> On 02/08/2018 09:58 AM, Heiko Carstens wrote:
> 
> > If you look at the generated code for the first patch: gcc now generates
> > its own jump table which then jumps (indirectly) to a brasl... So it's two
> > instead of one branch.
> > I'm not saying that this patch is not good, but there seem be a wrong
> > assumptions about the benefit here.  
> 
> I will now use the following patch description.
> 
> 
> 
>     KVM: s390: use switch vs jump table in intercept.c
>     
>     Instead of having huge jump tables for function selection,
>     let's use normal switch/case statements for the instruction
>     handlers in intercept.c We can now also get rid of
>     intercept_handler_t.
>     
>     This allows the compiler to make the right decision depending
>     on the situation (e.g. avoid jump-tables for thunks).
>     
>     Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
>     Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxxxxxxx>
>     Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
>     Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
> 
> commit cf392b582009f8ee4ef859f935dd9f67f855ccaf
> Author:     Christian Borntraeger <borntraeger@xxxxxxxxxx>
> AuthorDate: Fri Apr 8 17:52:39 2016 +0200
> Commit:     Christian Borntraeger <borntraeger@xxxxxxxxxx>
> CommitDate: Thu Feb 8 10:07:42 2018 +0000
> 
>     KVM: s390: use switch vs jump table in priv.c
>     
>     Instead of having huge jump tables for function selection,
>     let's use normal switch/case statements for the instruction
>     handlers in priv.c
>     
>     This allows the compiler to make the right decision depending
>     on the situation (e.g. avoid jump-tables for thunks).
>     
>     Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
>     Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
>     Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxxxxxxx>
>     Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
> 

Fine with me.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux