[Make-wifi-fast] a bit of profiling on the archer

Toke Høiland-Jørgensen toke at toke.dk
Fri Nov 18 09:30:48 EST 2016


Eric Dumazet <eric.dumazet at gmail.com> 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


More information about the Make-wifi-fast mailing list