Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3953458ybc; Thu, 14 Nov 2019 18:05:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzXPiQFD3RWtPTr6yn6nwwzq3ptsT69b+tghUWh5RCXDziKWMv2E7/M8Xcs2YA5E2VD2wK1 X-Received: by 2002:a17:906:95c1:: with SMTP id n1mr10039471ejy.158.1573783515577; Thu, 14 Nov 2019 18:05:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573783515; cv=none; d=google.com; s=arc-20160816; b=N5DJET4ZzbqdBiJWG0sAO2ru3xxvsHv3Vw7dqe4ugjj+7vClTgcNB+XeJiQxLA2HQJ gLE60hC1mB+9yIgasD1bLtNb4wE9PWNhuDh8RekIpsX6mt3fDdMx6US1XQ3RjmtX1omY 6Xvqv1RXNu9qmvrQrgBSwpS0/BMTe8cwYu8b4b5OF+UiBmAAVzBVwmdHUlxyV5jwGfQR QRvsgB54f54cgQe7swwa9DjcsTtJI3CUBEisR/y5IIiPPuQW5i/rkxzvyg4rDQQOC00S 7L/wKIiWgYVujH5KUlZ9dplxfdAV8l54gCVjU1ddsNuBn/C6aEeN3c+FMzpfmBUGPFPB LC3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=k+RkCsTHdY2ZkVMOeC5oUQogAL9fLuSmbUmi8ZzczVk=; b=BQIFHOUdrjxyyyngUvIpEc5v+F+Wht8uiVZKWQ2w5Pb3VL+zp6CXCEYy7Xgm0EbAXf 2yXL5VAFuhKxvEef27jfXkfUPZ65MaIw8N9zUfLsP6k7pAXXgzrIA0xCNrO2SjWJVLV5 sUR/HXvi+7igTtZV1pGHWCAETibJqdvngxtK/opVGHnsYTqmn2kwvHFnkdd9ybqmoGug pdrrfyd33qoNjfy853Q0hNCGw70R/7rXdIOjL334DOF6Lso+b7K4dsVg68L/CAA/oVm9 evOb0C9S8GT5EJazn5lyXnS/SejShPnUHgdwe52s3A61E/O0+lxt4c22zvwA0Wtd54Xk XTGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=folNVsCe; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si4451473ejn.288.2019.11.14.18.04.43; Thu, 14 Nov 2019 18:05:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=folNVsCe; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727483AbfKOCE0 (ORCPT + 99 others); Thu, 14 Nov 2019 21:04:26 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35200 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726956AbfKOCEZ (ORCPT ); Thu, 14 Nov 2019 21:04:25 -0500 Received: by mail-lj1-f195.google.com with SMTP id r7so8911121ljg.2 for ; Thu, 14 Nov 2019 18:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=k+RkCsTHdY2ZkVMOeC5oUQogAL9fLuSmbUmi8ZzczVk=; b=folNVsCeRICwPLDGWyppsoOrCQyy+uledLfhdhdLxyUq1LcIw5h74H6XE1/wpFlp7n WsF92nzEW5TrRSYESZcfTmrFgMwzAXZiskr0xbM+lDBdGL1tqC8OsWGgTFmOyE0XH7mR AyYa//UR6qiz8U2jb2d2cmZscGR9ZZGCOUAaheCu2bhvtNRthmexFXIPIKKd1UJ7zps8 WSrE1e4IvT3i4ikRlE71kGz0rc5l+B77+8VRDxaYbM7J+feHJKm+Ege5fmvyHxLFIvHS lkpRY7l4l7nCL1XcKznCy6hkYChIQuWOoCyIbAcuKpQpO2KMkK0L1g54a4I59Dkjve7x ZObA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=k+RkCsTHdY2ZkVMOeC5oUQogAL9fLuSmbUmi8ZzczVk=; b=D251srNIwUGto+Uyb8oHk2FZ9HCh95NbCMdb9ou4uSaKadSpHm5/NosatO6BqZCZMs wO1JhameZCI6ij7+NCMPxUsH3zRQHnUiaZY1L+8a4ZW77m5Rl0Z1MpdnE0C6Bd7KHpgG gl0PkB/KoicLRnwPqsTdEfJK9sUvMFahDwCnMCo2J+aBqS4AV9QMLprb2yPjLq59ZaVy BnaaGx3sBU2MCsH2eP2QZXOutohFkklWe+0+rlm9Rpy1GSzO9JMWUBz78Fh3+AR9Xp3k D2FHbf2aIR0ihgixdleH1QlNVhgX62xN72J8eZ9iWMeGas+tqs19JnQ05uoVDy5tcqfX QUMw== X-Gm-Message-State: APjAAAXGMJUaHqGmjcMqtBjzMUJssO8AlLFPnjpmBzRo58hr4Vb+uYKd D8FX6dXKtV/jCEFWyXmvM0PPzsm+lUq+bVGS3hcsdw== X-Received: by 2002:a2e:9ad8:: with SMTP id p24mr9126760ljj.114.1573783462751; Thu, 14 Nov 2019 18:04:22 -0800 (PST) MIME-Version: 1.0 References: <20191115014846.126007-1-kyan@google.com> In-Reply-To: <20191115014846.126007-1-kyan@google.com> From: Kan Yan Date: Thu, 14 Nov 2019 18:04:11 -0800 Message-ID: Subject: Re: [PATCH v8 0/2] Implement Airtime-based Queue Limit (AQL) To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Make-Wifi-fast , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Felix Fietkau , Yibo Zhao , John Crispin , Lorenzo Bianconi , Rajkumar Manoharan , Kevin Hayes Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org I have tested it with Toke's patch "[PATCH v6 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue", but didn't include it here, as it is self contained and Toke has plan to update it. The platform (QCA9984) used in my test doesn't support 802.11ax, so I was not able to test the HE mode support added in v7 update of "Import airtime calculation code from mt76" from Toke. On Thu, Nov 14, 2019 at 5:48 PM Kan Yan wrote: > > This patch series port the Airtime Queue Limits concept from the out-of-t= ree > ath10k implementation[0] to mac80211. This version takes my patch to do t= he > throttling in mac80211, and replaces the driver API with the mechanism fr= om > Toke's series, which instead calculated the expected airtime at dequeue t= ime > inside mac80211, storing it in the SKB cb field. > > This version has been tested on QCA9984 platform. > > [0] https://chromium-review.googlesource.com/c/chromiumos/third_party/ker= nel/+/1703105/7 > > Changelog: > > v8: > - Includes Toke's v7 version of "mac80211: Import airtime calculation c= ode from mt76" > - Don't clobber sta's customized queue limit when configuring the defau= lt via debugfs > - Fix a racing condition when reset aql_tx_pending. > > v7: > - Fix aql_total_pending_airtime underflow due to insufficient locking. > > v6: > - Fix sta lookup in ieee80211_report_used_skb(). > - Move call to ieee80211_sta_update_pending_airtime() to a bit later in > __ieee80211_tx_status() > v5: > - Add missing export of ieee80211_calc_rx_airtime() and make > ieee80211_calc_tx_airtime_rate() static (kbuildbot). > - Use skb_get_queue_mapping() to get the AC from the skb. > - Take basic rate configuration for the BSS into account when calculati= ng > multicast rate. > v4: > - Fix calculation that clamps the maximum airtime to fit into 10 bits > - Incorporate Rich Brown's nits for the commit message in Kan's patch > - Add fewer local variables to ieee80211_tx_dequeue() > v3: > - Move the tx_time_est field so it's shared with ack_frame_id, and use = units > of 4us for the value stored in it. > - Move the addition of the Ethernet header size into ieee80211_calc_exp= ected_tx_airtime() > v2: > - Integrate Kan's approach to airtime throttling. > - Hopefully fix the cb struct alignment on big-endian architectures. > > > > Kan Yan (1): > mac80211: Implement Airtime-based Queue Limit (AQL) > > Toke H=C3=B8iland-J=C3=B8rgensen (1): > mac80211: Import airtime calculation code from mt76 > > include/net/cfg80211.h | 7 + > include/net/mac80211.h | 41 +++ > net/mac80211/Makefile | 3 +- > net/mac80211/airtime.c | 597 +++++++++++++++++++++++++++++++++++++ > net/mac80211/debugfs.c | 85 ++++++ > net/mac80211/debugfs_sta.c | 43 ++- > net/mac80211/ieee80211_i.h | 8 + > net/mac80211/main.c | 10 +- > net/mac80211/sta_info.c | 38 +++ > net/mac80211/sta_info.h | 8 + > net/mac80211/tx.c | 47 ++- > 11 files changed, 872 insertions(+), 15 deletions(-) > create mode 100644 net/mac80211/airtime.c > > -- > 2.24.0.rc1.363.gb1bccd3e3d-goog >