[PATCH v5 3/7] eal: add lcore variable performance test
Mattias Rönnblom
hofors at lysator.liu.se
Wed Sep 18 08:05:16 CEST 2024
On 2024-09-17 17:40, Morten Brørup wrote:
>> + start = rte_rdtsc();
>> +
>> + for (i = 0; i < ITERATIONS; i++)
>> + update_fun(mods[i & num_mods_mask]);
>
> This indexing adds more instructions to be executed than just the update function.
> The added overhead is the same for all tested access methods, so the absolute difference in latency (i.e. measured in cycles) is still perfectly valid.
> Just mentioning it; no change required.
>
>> +
>> + end = rte_rdtsc();
>> +
>> + latency = (end - start) / ITERATIONS;
>
> This calculation is integer; add (double) somewhere to make it floating point.
>
Indeed, it is. Will fix.
>> +
>> + return latency;
>> +}
>
More information about the dev
mailing list