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

From: Thomas Gleixner
Date: Fri Jan 10 2020 - 06:43:02 EST


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.

Thanks,

tglx