Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753178AbcLEWzW (ORCPT ); Mon, 5 Dec 2016 17:55:22 -0500 Received: from mout.gmx.net ([212.227.17.21]:60042 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbcLEWzT (ORCPT ); Mon, 5 Dec 2016 17:55:19 -0500 Subject: Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. To: Pavel Machek References: <20161124085506.GA25007@amd> <20161124.110416.198867271899443489.davem@davemloft.net> <20161124212540.GA24796@amd> <20161202084511.GA32294@amd> <3192a4b6-1e97-048f-a0dd-bfc0f3d96ed8@st.com> <20161205101516.GA24936@amd> <20161205220221.GA19135@amd> <9a85da24-85cf-f94e-908f-a10eecac2369@gmx.de> <20161205224057.GB19135@amd> Cc: Giuseppe CAVALLARO , alexandre.torgue@st.com, David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Lino Sanfilippo Message-ID: <98fb3577-5f31-bf17-3e02-96c150854108@gmx.de> Date: Mon, 5 Dec 2016 23:54:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161205224057.GB19135@amd> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:YDANDJGiD10SjvMi5FQd2kuYXA8GQwdfRjepx5y4ulrqS4sL+fq OD29gtsC0M9JcQCm0yA0g61j+u1vv5Tu4x45lqbOsNSAo7F4HAkpELLLhkdjKOjeBEPA/wc Auqi8oNxmyih9BzpZBM06dlvrrNYc0I5ohDuJZSgvNKbeDGeA4x/d38UvCaNq91TaLiEfFr OKQN9fY9/MKIEDb4l2emQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:1L6kWKCsHDY=:8TZ+RsRgVFY0bgIRD1wqdN S2dKixcnZTNyCSCV5CuM2n5hDLb5XGxqRVTBs3RW8WsxpnFXi77wxOeyP8Sa/9CGlXtEajJqh KeO1Uw9gXhtrxy3TJcGPrhGIx4eRDmr7yi4vm6c6lBaFjJCiqQ2lpLQRUFRRpG7OfVZMq0Far TFYh8DTTNta8vD6beW+5/o9ngqDruZNky9l1tI4CUQrJ4cGOOaSoTrlUNTPnWG52lSC6oDXTs R4ryw8uXahu2/XeTZyG72Il9obQfcst4hXfvtE3yJw0H69D8E1XMNmAO7KY+EeQOqyfd26tGR Gevr1hf7E1eznvlxSHOUHkDrK+DySgZAc8/aABOiXgPA7Dr1VANd0Xc42sJkC7f0kHbQ5Mkds Ckw8lIYygOWrp78uEYXNbV1oUHJn4cn01Myu+dXI3v53CXzKj7fWq98gD3Qo8O5AOoDm8dRkE QRTH7c/9DrFjZcENkPQLsDSlChPRlUDD2kwzqPaZx4eNODblRpgv2d01gHZVQSNjgeQbhuSK/ Awg2Eis+Kqq4EJVTFnARIIu4JNL/uOzC9ZeG9QR4OD+QxeJXo/4/cOrhe4/vI7ZDtcBdusfAN lDKkHuEMpyNrR7LgJiarYGOYPxLa/wjS3wotW10bEvxzyCGI0wCBEzDMjgTKF2S8YrLkh5uWi vhJ5xd6DLvVN0PUG+diDc+GUhEW4LuUCzygQR4BHuKtFz/YgNrTsxedPoq/bHgX9Nx84DmhCd e+6uHOmRnGIYWF3+q1IMF6a4Pu31N1V+7oUc29HHGd+zYYGraiLModjyKKdxAZoQe+olDojY7 tTChPBO Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 875 Lines: 30 On 05.12.2016 23:40, Pavel Machek wrote: > On Mon 2016-12-05 23:37:09, Lino Sanfilippo wrote: >> Hi Pavel, >> >> On 05.12.2016 23:02, Pavel Machek wrote: >> > >> > we need spin_lock_bh at minimum, as we are locking user context >> > against timer. >> > >> > Best regards, >> > Pavel >> > >> >> I was referring to stmmac_tx_clean() which AFAICS is only called from softirq context, >> (one time in the timer handler and one time in napi poll handler) so a spin_lock() should >> be sufficient. I cant see how this is called from userspace. If it were, a spin_lock_bh() had >> to be used, of course. > > stmmac_tx_clean() shares lock with stmmac_tx() -- and that's process > context as far as I can tell. So... spin_lock_bh() at > minimum... right? > > Pavel > You mean stmmac_xmit()? Thats also softirq AFAICT, its the TX softirq.... Regards, Lino