[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <abe131ba-e768-4919-4cbb-44d6e005a98f@denx.de>
Date: Wed, 4 Nov 2020 16:31:37 +0100
From: Marek Vasut <marex@...x.de>
To: Martin Kepplinger <martink@...teo.de>,
linux-wireless@...r.kernel.org
Cc: Angus Ainslie <angus@...ea.ca>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Kalle Valo <kvalo@...eaurora.org>,
Lee Jones <lee.jones@...aro.org>,
Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>,
Siva Rebbagondla <siva8118@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] rsi: Move card interrupt handling to RX thread
On 11/4/20 4:21 PM, Martin Kepplinger wrote:
> On 03.11.20 19:09, Marek Vasut wrote:
>> The interrupt handling of the RS911x is particularly heavy. For each RX
>> packet, the card does three SDIO transactions, one to read interrupt
>> status register, one to RX buffer length, one to read the RX packet(s).
>> This translates to ~330 uS per one cycle of interrupt handler. In case
>> there is more incoming traffic, this will be more.
>>
>> The drivers/mmc/core/sdio_irq.c has the following comment, quote "Just
>> like traditional hard IRQ handlers, we expect SDIO IRQ handlers to be
>> quick and to the point, so that the holding of the host lock does not
>> cover too much work that doesn't require that lock to be held."
>>
>> The RS911x interrupt handler does not fit that. This patch therefore
>> changes it such that the entire IRQ handler is moved to the RX thread
>> instead, and the interrupt handler only wakes the RX thread.
>>
>> This is OK, because the interrupt handler only does things which can
>> also be done in the RX thread, that is, it checks for firmware loading
>> error(s), it checks buffer status, it checks whether a packet arrived
>> and if so, reads out the packet and passes it to network stack.
>>
>> Moreover, this change permits removal of a code which allocated an
>> skbuff only to get 4-byte-aligned buffer, read up to 8kiB of data
>> into the skbuff, queue this skbuff into local private queue, then in
>> RX thread, this buffer is dequeued, the data in the skbuff as passed
>> to the RSI driver core, and the skbuff is deallocated. All this is
>> replaced by directly calling the RSI driver core with local buffer.
>>
>> Signed-off-by: Marek Vasut <marex@...x.de>
>> Cc: Angus Ainslie <angus@...ea.ca>
>> Cc: David S. Miller <davem@...emloft.net>
>> Cc: Jakub Kicinski <kuba@...nel.org>
>> Cc: Kalle Valo <kvalo@...eaurora.org>
>> Cc: Lee Jones <lee.jones@...aro.org>
>> Cc: Martin Kepplinger <martink@...teo.de>
>> Cc: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@...i.sm>
>> Cc: Siva Rebbagondla <siva8118@...il.com>
>> Cc: linux-wireless@...r.kernel.org
>> Cc: netdev@...r.kernel.org
>> ---
>> drivers/net/wireless/rsi/rsi_91x_sdio.c | 6 +--
>> drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 52 ++++++---------------
>> drivers/net/wireless/rsi/rsi_sdio.h | 8 +---
>> 3 files changed, 15 insertions(+), 51 deletions(-)
>
>
> hi Marek,
Hi,
> I'm running this without problems, so feel free to add
>
> Tested-by: Martin Kepplinger <martin.kepplinger@...i.sm>
Thank you.
Do you observe better RX performance ? For me, without this patch,
iperf3 -R did ~4 Mbit/s on iwlwifi AP running hostap in 802.11n mode
(wpa2 tkip), with this patch I see 40 Mbit/s (10x better, yes). However,
the poor rx performance did depend on the kernel configuration (HZ,
preemption settings) before, now it does not.
Powered by blists - more mailing lists