Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751852AbcLEKde (ORCPT ); Mon, 5 Dec 2016 05:33:34 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:40706 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464AbcLEKdc (ORCPT ); Mon, 5 Dec 2016 05:33:32 -0500 Date: Mon, 5 Dec 2016 11:15:16 +0100 From: Pavel Machek To: Giuseppe CAVALLARO Cc: 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: <20161205101516.GA24936@amd> References: <20161123105125.GA26394@amd> <20161124085506.GA25007@amd> <20161124.110416.198867271899443489.davem@davemloft.net> <20161124212540.GA24796@amd> <20161202084511.GA32294@amd> <3192a4b6-1e97-048f-a0dd-bfc0f3d96ed8@st.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <3192a4b6-1e97-048f-a0dd-bfc0f3d96ed8@st.com> 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: 1244 Lines: 43 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >>In the ring, some descriptors can raise the irq (according to a > >>threshold) and set the IC bit. In this path, the NAPI poll will be > >>scheduled. > > > >Not NAPI poll but stmmac_tx_timer(), right? >=20 > in the xmit according the the threshold the timer is started or the > interrupt is set inside the descriptor. > Then stmmac_tx_clean will be always called and, if you see the flow, > no irqlock protection is needed! Actually, I was wrong. irqlock protection is needed, since stmmac_tx_clean() is called from timer, and that's interrupt context, as you can confirm using BUG_ON(in_interrupt()); Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlhFPjQACgkQMOfwapXb+vKAGACfamFuk80BY35hKic3g31zD1uQ flAAn1qTFG9LgRzntwv1c1MHCp1xETT9 =Quy3 -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm--