Re: [PATCHv8 02/34] lib/vdso: make do_hres and do_coarse as __always_inline

From: Vincenzo Frascino
Date: Fri Jan 10 2020 - 06:44:55 EST




On 1/10/20 11:42 AM, Thomas Gleixner wrote:
> Vincenzo Frascino <vincenzo.frascino@xxxxxxx> writes:
>> On 11/12/19 1:26 AM, Dmitry Safonov wrote:
>>> +Â Â vdÂ=Â&vd[CS_HRES_COARSE];
>>> +out_hres:
>>> +Â Â returnÂdo_hres(vd,Âclock,Âts);
>>> Â }ÂelseÂifÂ(mskÂ&ÂVDSO_COARSE)Â{
>>> Â Â do_coarse(&vd[CS_HRES_COARSE],Âclock,Âts);
>>> Â Â returnÂ0;
>>> Â }ÂelseÂifÂ(mskÂ&ÂVDSO_RAW)Â{
>>> -Â Â returnÂdo_hres(&vd[CS_RAW],Âclock,Âts);
>>> +Â Â vdÂ=Â&vd[CS_RAW];
>>> +Â Â /*ÂgotoÂallowsÂtoÂavoidÂextraÂinliningÂofÂdo_hres.Â*/
>>> +Â Â gotoÂout_hres;
>>
>> What is the performance impact of "goto out_hres"?
>
> On x86 it's invisible at least in my limited testing.

On arm64 as well based on mine as well. Shall we keep the code more readable
here (without goto)?

>
> Thanks,
>
> tglx
>

--
Regards,
Vincenzo