Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752921AbcLEWlE (ORCPT ); Mon, 5 Dec 2016 17:41:04 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:35631 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbcLEWlA (ORCPT ); Mon, 5 Dec 2016 17:41:00 -0500 Date: Mon, 5 Dec 2016 23:40:57 +0100 From: Pavel Machek To: Lino Sanfilippo Cc: Giuseppe CAVALLARO , alexandre.torgue@st.com, David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Message-ID: <20161205224057.GB19135@amd> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DBIVS5p969aUjpLe" Content-Disposition: inline In-Reply-To: <9a85da24-85cf-f94e-908f-a10eecac2369@gmx.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1329 Lines: 50 --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2016-12-05 23:37:09, Lino Sanfilippo wrote: > Hi Pavel, >=20 > On 05.12.2016 23:02, Pavel Machek wrote: > >=20 > > we need spin_lock_bh at minimum, as we are locking user context > > against timer. > >=20 > > Best regards, > > Pavel > >=20 >=20 > I was referring to stmmac_tx_clean() which AFAICS is only called from sof= tirq context, > (one time in the timer handler and one time in napi poll handler) so a sp= in_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 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --DBIVS5p969aUjpLe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlhF7PkACgkQMOfwapXb+vJ4pwCfTplKUMFac2fmihfwK6+L0BUE Ot8AoKhkb0sC+m2bmThDhUKlEvpt7vk7 =s0vP -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe--