Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12AD4C2BB1D for ; Thu, 12 Mar 2020 08:09:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED4CE20650 for ; Thu, 12 Mar 2020 08:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbgCLIJB (ORCPT ); Thu, 12 Mar 2020 04:09:01 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:59244 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgCLIJB (ORCPT ); Thu, 12 Mar 2020 04:09:01 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID 02C88sXc006396, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTEXMB06.realtek.com.tw[172.21.6.99]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id 02C88sXc006396 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Mar 2020 16:08:54 +0800 Received: from RTEXMB04.realtek.com.tw (172.21.6.97) by RTEXMB06.realtek.com.tw (172.21.6.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 12 Mar 2020 16:08:54 +0800 Received: from localhost.localdomain (172.21.68.128) by RTEXMB04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 12 Mar 2020 16:08:54 +0800 From: To: CC: , Subject: [PATCH 0/5] rtw88: TX path update for latency and efficiency Date: Thu, 12 Mar 2020 16:08:47 +0800 Message-ID: <20200312080852.16684-1-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.128] X-ClientProxiedBy: RTEXMB03.realtek.com.tw (172.21.6.96) To RTEXMB04.realtek.com.tw (172.21.6.97) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yan-Hsuan Chuang This patchset makes the driver transmit with less CPU latency and higher efficiency. Originally, the TX path hold an IRQ lock that will disable all of the IRQs, to wait for the PS state transition. It may sometimes cause the CPU to delay for a long enough time, like several milliseconds. This could lead to some time-sensitive programs to lose their immediacy. We can just use *_bh() locks to not to block the IRQs, and only use *_irqsafe() locks to the ISR related settings. And, the TX path includes to send reserved pages to the device. But the old reserved page routine did not consider that the driver could possibly run multiple vifs at the same time. So, update the reserved page routine of the TX path to generate reserved pages and associate them to each vif, so we can take multi-vif into consideration. For the data packets come from TX queue, the driver used to kick off them one by one, while we can do better to kick a bunch of them at once to save some time to access to the IO register and the DMA engine transition Brian Norris (1): rtw88: don't hold all IRQs disabled for PS operations Yan-Hsuan Chuang (4): rtw88: extract alloc rsvd_page and h2c skb routines rtw88: associate reserved pages with each vif rtw88: pci: define a mask for TX/RX BD indexes rtw88: kick off TX packets once for higher efficiency drivers/net/wireless/realtek/rtw88/fw.c | 265 ++++++++++++++---- drivers/net/wireless/realtek/rtw88/fw.h | 25 +- drivers/net/wireless/realtek/rtw88/hci.h | 20 +- drivers/net/wireless/realtek/rtw88/mac80211.c | 22 +- drivers/net/wireless/realtek/rtw88/main.c | 9 +- drivers/net/wireless/realtek/rtw88/main.h | 1 + drivers/net/wireless/realtek/rtw88/pci.c | 199 ++++++++----- drivers/net/wireless/realtek/rtw88/pci.h | 7 +- drivers/net/wireless/realtek/rtw88/tx.c | 131 +++++++-- drivers/net/wireless/realtek/rtw88/tx.h | 10 +- drivers/net/wireless/realtek/rtw88/wow.c | 39 +-- 11 files changed, 516 insertions(+), 212 deletions(-) -- 2.17.1