Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761600AbcLBOFd (ORCPT ); Fri, 2 Dec 2016 09:05:33 -0500 Received: from mout.gmx.net ([212.227.15.19]:64933 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759658AbcLBOFc (ORCPT ); Fri, 2 Dec 2016 09:05:32 -0500 MIME-Version: 1.0 Message-ID: From: "Lino Sanfilippo" To: "Pavel Machek" Cc: "Giuseppe CAVALLARO" , alexandre.torgue@st.com, "David Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Aw: Re: stmmac ethernet in kernel 4.9-rc6: coalescing related pauses. Content-Type: text/plain; charset=UTF-8 Date: Fri, 2 Dec 2016 15:05:21 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <20161202084511.GA32294@amd> References: <20161123105125.GA26394@amd> <20161124085506.GA25007@amd> <20161124.110416.198867271899443489.davem@davemloft.net> <20161124212540.GA24796@amd> , <20161202084511.GA32294@amd> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K0:0Z6/paT38f4NScwnLyr9nwts3+S3zYEpQXoFTUCHnxy fttSOQy/1Y6Rs5/tbMvZUkZMcoSkcPMnzOtqFxvHLqIDV57crC ZzRe93W2u6ckXRYPEsVHo5KNiekBuvzsDVvR5sGI3ZiV5USKHz +MhygjIsZ7/LPter/AQsytTXjRdbRlc8DuO0R2Qq+jD0WkNnEX be6kSPaiA6yfVlM5LC8mX1ovPtM4c5bhtK8DYKvmx3Kp1UI6K+ cCH+I6JwgvZ0ylYVThYy5aQGQBxvzBNZdLXExvDjKw5ezzStO2 YI6zxU= X-UI-Out-Filterresults: notjunk:1;V01:K0:FUeyhhqDyfM=:jj3Ry9QSOVi/5zhqf+uxDi M3DaCNlDXoFyGQZaRyZvqdtwUAhSGRVBxNsybzfj/gKkcRuGYgNhCx6qfEnYsIl61EWgIngkB dFfIMJ4TjJxEVFBA9TSG9oAeo60JpYCekn7BvBsfg0OFraFkGTcTp9JSRSSm3LNtPnKJNMzBL QZFYTqrlTUDsQDOzCQQU6N4WOj1KcndZfuIqrxdevAP98NYFUHq1zpd0KcvIe1cuYh+yOHdjU HdmEzTIq26Mo4Xk7AZGheTWg/uqKz2R6SJaO2wsptiDG9F7ohB07UDLRgEbD9/bQKINQtLjc4 U4oj697Nn+N+jnysaGyZnB0h/pGdRXvewmcNmdnomzy6JQ+6Cj8wBDA1dd1rQhiWeQIR61nWa I5sjYOyPRhMb3KhimIgG6NIk0RF/PycCUtjjZyD59gMC9CYT/N+pun9gcHS+zsJnuj4kb2KWA 7LmNfFoQIw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 621 Lines: 28 Hi, > > There's nothing that protect stmmac_poll() from running concurently > with stmmac_dma_interrupt(), right? > could it be that there is also another issue concerned locking?: The tx completion handler takes the xmit_lock in case that the netif_queue is stopped. This is AFAICS unnecessary, since both xmit and completion handler are already synchronized by the private tx lock. But it is IMHO also dangerous: In the xmit handler we have the locking order 1. xmit_lock 2. private tx lock while in the completion handler its the reverse: 1. private tx lock 2. xmit lock. Do I miss something? Regards, Lino