Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933281AbcK1P6K (ORCPT ); Mon, 28 Nov 2016 10:58:10 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:45886 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932373AbcK1P6B (ORCPT ); Mon, 28 Nov 2016 10:58:01 -0500 Subject: Re: stmmac ethernet in kernel 4.4: coalescing related pauses? To: Eric Dumazet , David Miller References: <20161123105125.GA26394@amd> <20161128.095431.856183735501262965.davem@davemloft.net> <1480347103.18162.58.camel@edumazet-glaptop3.roam.corp.google.com> CC: , , , From: Lino Sanfilippo Message-ID: <920b1148-a77d-0b69-01b0-b14bcbdf8648@marvell.com> Date: Mon, 28 Nov 2016 16:57:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1480347103.18162.58.camel@edumazet-glaptop3.roam.corp.google.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-28_04:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611280261 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 900 Lines: 32 On 28.11.2016 16:31, Eric Dumazet wrote: > On Mon, 2016-11-28 at 09:54 -0500, David Miller wrote: >> From: Lino Sanfilippo >> Date: Mon, 28 Nov 2016 14:07:51 +0100 >> >>> Calling skb_orphan() in the xmit handler made this issue disappear. >> >> This is not the way to handle this problem. >> >> The solution is to free the SKBs in a timely manner after the >> chip has transmitted the frame. > > Note that the 'pauses' described by Pavel are also caused by a too small > SO_SNDBUF value on the UDP socket. > > An immediate fix, with no kernel change is to increase it. > > echo 1000000 >/proc/sys/net/core/wmem_default > > or > > val = 1000000; > setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, sizeof(val)); > I wonder if the best fix would be indeed to deactivate irq coalescing completely. Does it make any sense at all to use it if a driver uses NAPI already? Regards, Lino