RE: [PATCH v7 4/6] wifi: rtw88: sdio: track free TX pages and OQT credits for RTL8723BS
From: Ping-Ke Shih
Date: Tue Aug 25 2026 - 04:53:20 EST
Luka Gejak <luka.gejak@xxxxxxxxx> wrote:
> On your other mail about the back and forth in patch 6: you are right, and
> pci.c is the better model. It takes irq_lock around the check and the stop
> in rtw_pci_tx_write(), and the wake side runs in rtw_pci_tx_isr() with the
> same lock already held by the caller, so the two cannot interleave. That is
> why there is no smp_mb, no READ_ONCE and no undo anywhere in pci.c.
>
> I will do the same for SDIO, using the tx_queue spinlock that
> skb_queue_tail() and skb_dequeue() already take, and drop the barriers,
> the _ONCE accessors and the re-check entirely. That really does change the
> locking, so it needs retesting on hardware and v8 will follow once that is
> done.
Though locks might be a bottleneck of performance, the code would be
much simpler. So, please measure the performance impact after you revise
the flow.
Ping-Ke