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

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

 




On 02/08/2018 10:07 AM, Christian Borntraeger wrote:
> 
> 
> On 02/08/2018 09:58 AM, Heiko Carstens wrote:
>> On Tue, Feb 06, 2018 at 01:30:28PM +0100, David Hildenbrand wrote:
>>> On 06.02.2018 12:21, Christian Borntraeger wrote:
>>>> Some old patches refreshed.
>>>>
>>>
>>> Certainly the right thing to do. Especially also interesting due to
>>> retpotline (if we get something like that on s390x). If I remember
>>> correctly, x86 highly benefits by replacing magic function pointer by
>>> switch statements.
>>
>> 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.
> 
> Seems to depend on the compiler. The gcc 7.2 from my Fedora 27 seems to do 
> the right thing for intercept.o and priv.o.
> In the end this will also help the new -mindirect-branch thing as the gcc
> support also avoids jump tables if we use thunks.

I will update the patch description and focus more on the "let us use the compiler
heuristics" and "prepare for thunks".

--
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