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.
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux