On 05/16/2018 11:56 AM, David Miller wrote: > From: Jose Abreu <jose.ab...@synopsys.com> > Date: Wed, 16 May 2018 13:50:42 +0100 > >> David raised some rightfull constrains about the use of indirect callbacks in >> the code. I did iperf tests with and without patches 3-12 and the performance >> remained equal. I guess for 1Gb/s and because my setup has a powerfull >> processor these patches don't affect the performance. > > Does your cpu need Spectre v1 and v2 workarounds which cause indirect calls to > be extremely expensive?
Given how widespread stmmac is within the ARM CPU's ecosystem, the answer is more than likely yes. To get a better feeling of whether your indirect branches introduce a difference, either don't run the CPU at full speed (e.g: use cpufreq to slow it down), and/or profile the number of cycles and instruction cache hits/miss ratio for the functions called in hot-path. -- Florian