From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 758B83B2A0 for ; Fri, 18 Nov 2016 09:30:50 -0500 (EST) Received: from mail.toke.dk (localhost.localdomain [127.0.0.1]) by mail.toke.dk (Postfix) with ESMTPS id 4C9FD1175C9; Fri, 18 Nov 2016 15:30:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1479479449; bh=qs2t07p2LT1+4nTmmo7dsdbn8uqpuIQ+B+DXRH6zEzo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=t9dimiP6YV6KJOuMHpHwtgFdPo1zUJKhl17t/K9cHJD6/fF6Lh5uRxE2O3zCElilZ uBh8YsyfBKo+nZ38lhjRLLd86lbqn+qp6yfL/ROiauMyXhgMZZiJISIL6CsGuOdX0w EHhc6Ee3RFfU7zgXJ+YWb8+e5VfBuI+JvaeJBK3tIEd68N+qYVRLXY5VGwim99Anpi wDo0ZwuBpyUwruRSw9BTxIBLXwMiBfHVjTo+5X5ZzUliMxSAIbrnZMtpG+YrxE5Mj4 aJnnG8XcI8TL8l8d8gNEUvgZmNxoyiv1dTzHxNsMI4bKAnzGZSdZmeaBmeDHdJBPF5 8eMAi9crLwjwg== Received: by alrua-kau.kau.toke.dk (Postfix, from userid 1000) id 26B96C40122; Fri, 18 Nov 2016 15:30:48 +0100 (CET) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Eric Dumazet Cc: Jesper Dangaard Brouer , make-wifi-fast@lists.bufferbloat.net References: <20161118085524.62d6cfdd@redhat.com> <1479478433.8455.284.camel@edumazet-glaptop3.roam.corp.google.com> Date: Fri, 18 Nov 2016 15:30:48 +0100 In-Reply-To: <1479478433.8455.284.camel@edumazet-glaptop3.roam.corp.google.com> (Eric Dumazet's message of "Fri, 18 Nov 2016 06:13:53 -0800") X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87vavkzwpz.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Make-wifi-fast] a bit of profiling on the archer X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2016 14:30:50 -0000 Eric Dumazet writes: > On Fri, 2016-11-18 at 08:55 +0100, Jesper Dangaard Brouer wrote: > >> Be careful you don't fool yourself. In your output you have the >> "children" mode on, so everything being called "under" net_rx_action is >> summed up. It could be it goes all the way through to the wifi TX >> parts and that is part of the sum. Even the memory allocations gets >> summed into this 66% number. > > Yes, I really do not see how ag71xx would be to blame ;) > > Although.... looking at > > https://aachen.uni-dsl.de/svn/unidsl_firmware/backfire/trunk/backfire/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c > > I do see a bug : > > if (rx_done < limit) { > if (status & RX_STATUS_PR) > goto more; > > status = ag71xx_rr(ag, AG71XX_REG_TX_STATUS); > if (status & TX_STATUS_PS) > goto more; > > DBG("%s: disable polling mode, rx=%d, tx=%d,limit=%d\n", > dev->name, rx_done, tx_done, limit); > > napi_complete(napi); > Hint: > napi_complete_done(napi, rx_done); > > /* enable interrupts */ > spin_lock_irqsave(&ag->lock, flags); > ag71xx_int_enable(ag, AG71XX_INT_POLL); > spin_unlock_irqrestore(&ag->lock, flags); > return rx_done; > } > > more: > DBG("%s: stay in polling mode, rx=%d, tx=%d, limit=%d\n", > dev->name, rx_done, tx_done, limit); > return rx_done; > > This last statement should be : "return limit;" And it seems to be in current versions: https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c;h=566e9513d8b7c6ef101902ae7d281dcc1c233893;hb=HEAD#l1156 Wonder why these drivers are not upstreamed, though? -Toke