From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH v2 net-next 00/12] net: stmmac: Clean-up and tune-up Date: Wed, 16 May 2018 12:01:26 -0700 Message-ID: <64edab6c-0bbf-fd8a-6be6-aaf802f6d12f@gmail.com> References: <20180516.145611.65752290278287985.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Joao.Pinto@synopsys.com, Vitor.Soares@synopsys.com, peppe.cavallaro@st.com, alexandre.torgue@st.com To: David Miller , Jose.Abreu@synopsys.com Return-path: Received: from mail-qk0-f193.google.com ([209.85.220.193]:39052 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbeEPTBg (ORCPT ); Wed, 16 May 2018 15:01:36 -0400 Received: by mail-qk0-f193.google.com with SMTP id z75-v6so1566669qkb.6 for ; Wed, 16 May 2018 12:01:36 -0700 (PDT) In-Reply-To: <20180516.145611.65752290278287985.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 05/16/2018 11:56 AM, David Miller wrote: > From: Jose Abreu > 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