[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5B2DA6FDDF928F4E855344EE0A5C39D1D5C9CE47@RTITMBSVM04.realtek.com.tw>
Date: Wed, 13 Nov 2019 03:43:45 +0000
From: Pkshih <pkshih@...ltek.com>
To: Lucas Stach <dev@...xeye.de>, wlanfae <wlanfae@...ltek.com>
CC: "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: long delays in rtl8723 drivers in irq disabled sections
> -----Original Message-----
> From: linux-wireless-owner@...r.kernel.org [mailto:linux-wireless-owner@...r.kernel.org] On Behalf
> Of Lucas Stach
> Sent: Wednesday, November 13, 2019 5:02 AM
> To: wlanfae; Pkshih
> Cc: linux-wireless@...r.kernel.org; netdev@...r.kernel.org
> Subject: long delays in rtl8723 drivers in irq disabled sections
>
> Hi all,
>
> while investigating some latency issues on my laptop I stumbled across
> quite large delays in the rtl8723 PHY code, which are done in IRQ
> disabled atomic sections, which is blocking IRQ servicing for all
> devices in the system.
>
> Specifically there are 3 consecutive 1ms delays in
> rtl8723_phy_rf_serial_read(), which is used in an IRQ disabled call
> path. Sadly those delays don't have any comment in the code explaining
> why they are needed. I hope that anyone can tell if those delays are
> strictly neccessary and if so if they really need to be this long.
>
These delays are because read RF register is an indirect access that hardware
needs time to accomplish read action, but there's no ready bit, so delay
is required to guarantee the read value is correct. It is possible to
use smaller delay, but it's exactly required.
An alternative way is to prevent calling this function in IRQ disabled flow.
Could you share the calling trace?
Thanks
PK
Powered by blists - more mailing lists