Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2035550ybc; Sun, 17 Nov 2019 12:29:39 -0800 (PST) X-Google-Smtp-Source: APXvYqzv0e4K8SY91i0OcugcNoD+JDZ+vcsgH6fRz0wyIaeLpa7PI0gf56H5MIbugGPrCpEduZvP X-Received: by 2002:a17:906:4cd0:: with SMTP id q16mr15009209ejt.261.1574022579104; Sun, 17 Nov 2019 12:29:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574022579; cv=none; d=google.com; s=arc-20160816; b=A4+J1zzshnvJ1nWLoYb4gSRwWLij+VPInadNmxygNp+aF+IWCIbe+TMvrvaXusqs7E D6p8CQw4/FYx7OLqv+SAnrsPdbPd2FmauDDOdmUQI5qkYGDybSHVWqejm8viFntZ5CPY Dw7OsbhldbLd2j7zj4o0beUWPO6d2rqvDhwej94QGtjZ5YP/kIcNPW2tp+vYLk/wnyJt VQsT7ptDR9HDnKO4HkU0Wn3ABbNRonH0ssm2pRkXERik9DVqE0hAJ411RYGa+aFtGrg6 teLvygVDXU5QZ7MDp9dr0gK8233x9Xl/Cln8fzqAGybehckzyQacgboIi/KUvebsFMWG qmKQ== 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=Ql6OPsK4uQYSkaAsGyBu94gd3BNPrccgvPAvpalrUQQ=; b=ParPCD1jeE6RYp24nSbiSGLFuo3es4tkggrZ71QHy9u3HF1fRv6503U01KoMkQu9di D1xcY5OKPpOf8tibzVcaw4mx0z8fqsT/UqS9OmUjAhaCKaqxBLmdUKDQtaM+i1pbc36g aSnLst3rbNNVKKpqpEjfEhW374nXQoxXbsKQrFl2hsBy8HRNvew+uC0YwOINOK9x21ns vXMaJdCkZjgLov7etoPkFoetE1Wko8eQaIlnxZt86Gtr03FDx4bNSgs7wsU+2MoWoCvI 1pl8idKVgDjvOrHLKv0daKI6VxUe+PSLQ8eclSY5xUY4FRDu+6PTyoa+4tKDa08/3oZV 8mBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZPoAuICA; 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 c8si11642627ede.323.2019.11.17.12.28.58; Sun, 17 Nov 2019 12:29:39 -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=ZPoAuICA; 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 S1726273AbfKQUZF (ORCPT + 99 others); Sun, 17 Nov 2019 15:25:05 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45591 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbfKQUZF (ORCPT ); Sun, 17 Nov 2019 15:25:05 -0500 Received: by mail-lj1-f194.google.com with SMTP id n21so16370700ljg.12 for ; Sun, 17 Nov 2019 12:25:03 -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=Ql6OPsK4uQYSkaAsGyBu94gd3BNPrccgvPAvpalrUQQ=; b=ZPoAuICAkjxKQgHPGL+AyFKDAZTJ/RODCKSZyZQsYEh6LdpYJ/u7vQiYPUhupoMhAI TlD7L+W4j7LiGb5I2eAx0CQx9DiuZU7b1QNUf/MfGqFG80Y9tEAjsYnQ/dsXRzRg94h8 NitnzK7p10yjnqfmVLUcJQ4eomZ7v/gDqJ2Re3wBqMj1bODmxZriGDwDv1uIgaNM2kkQ Awwkc7Qfn/XIp6GZ6NDZhrqbOXidR9ye1RLt1BJ4D9XGvQif3RCskt37XF7D3QDSzhJW MtqwO2us/w5OYOraunBCV9PLbSzJvChKRQ6H+6/5g/0mcWzleihT04816Yzwu8LQPqO3 8Ytg== 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=Ql6OPsK4uQYSkaAsGyBu94gd3BNPrccgvPAvpalrUQQ=; b=NbvpZ73WTfUJ2U4UlDVdcLGJXAzGGnKJkUW4kdpCW8aojqa8L2XeObtv3AJqvwN9Qp 0zslYDEdZimitF2fOyk6jqs73LtNTKN/qHh2/PiGEiwelAC/T/oI3QbGeAcnBnPff7EL 6epnftuDVwxeoGfMrs7oSW3yM2MzReutoXmMCMkNKbS6MEmiQymVsa+iOruILUZZ5f0U 852z+JK6uS70dmGwbrGjW0D4UVBu4rFigG9albrRyE0qmvGsXp8rhfApD4bkagWyDBfa spB9ZzB7Vx/SFA/xiepCpBsVzUSXrSo7cMqi6Mr7FQc5HONjyfCJqTGHaicVVsjyGC94 7PCg== X-Gm-Message-State: APjAAAVLji7nDL/RDhZLuDSKZYzcNEH/Uo/JUjk0/Z4Vz7UNM0HKtGM3 ezSf9Y5vk9P60rhmwrZdA++u+afjSn27wAznBfphZQ== X-Received: by 2002:a2e:9ad8:: with SMTP id p24mr7233950ljj.114.1574022302590; Sun, 17 Nov 2019 12:25:02 -0800 (PST) MIME-Version: 1.0 References: <157382403672.580235.12525941420808058808.stgit@toke.dk> <157382404118.580235.14216392299709793599.stgit@toke.dk> <87y2wgjas4.fsf@toke.dk> In-Reply-To: <87y2wgjas4.fsf@toke.dk> From: Kan Yan Date: Sun, 17 Nov 2019 12:24:51 -0800 Message-ID: Subject: Re: [PATCH v9 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Johannes Berg , linux-wireless , Make-Wifi-fast , ath10k@lists.infradead.org, John Crispin , Lorenzo Bianconi , Felix Fietkau , 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 > > Given the fact that AQL is only tested in very limited platforms, > > should we set the default to disabled by removing this change in the > > next update? > > > > - local->airtime_flags =3D AIRTIME_USE_TX | AIRTIME_USE_RX; > > + > > + local->airtime_flags =3D AIRTIME_USE_TX | > > + AIRTIME_USE_RX | > > + AIRTIME_USE_AQL; > > + local->aql_threshold =3D IEEE80211_AQL_THRESHOLD; > > + atomic_set(&local->aql_total_pending_airtime, 0); > Well, we have the whole -rc series to get more testing in if we merge it > as-is. It's up to the maintainers, of course, but I would be in favour > of merging as-is, then optionally backing out the default before the > final release if problems do turn up. But I would hope that the limits > are sufficiently conservative that it would not result in any problems :) Sounds good. The current default limits are reasonably conservative and are tunable via debugfs. I will give the v10 version of this patch serial a quick test and hopefully we can wrap it up soon. -Kan On Sat, Nov 16, 2019 at 3:55 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Kan Yan writes: > > >> +static inline u16 > >> +ieee80211_info_set_tx_time_est(struct ieee80211_tx_info *info, u16 tx= _time_est) > >> +{ > >> + /* We only have 10 bits in tx_time_est, so store airtime > >> + * in increments of 4us and clamp the maximum to 2**12-1 > >> + */ > >> + info->tx_time_est =3D min_t(u16, tx_time_est, 4095) >> 2; > >> + return info->tx_time_est; > >> +} > >> + > >> +static inline u16 > >> +ieee80211_info_get_tx_time_est(struct ieee80211_tx_info *info) > >> +{ > >> + return info->tx_time_est << 2; > >> +} > >> + > > > > set_tx_time_est() returns airtime in different units (4us) than > > get_tx_time_est(), this will cause the pending_airtime out of whack. > > Huh, you're quite right; oops! I meant to shift that back before > returning. Will fix. > > > Given the fact that AQL is only tested in very limited platforms, > > should we set the default to disabled by removing this change in the > > next update? > > > > - local->airtime_flags =3D AIRTIME_USE_TX | AIRTIME_USE_RX; > > + > > + local->airtime_flags =3D AIRTIME_USE_TX | > > + AIRTIME_USE_RX | > > + AIRTIME_USE_AQL; > > + local->aql_threshold =3D IEEE80211_AQL_THRESHOLD; > > + atomic_set(&local->aql_total_pending_airtime, 0); > > Well, we have the whole -rc series to get more testing in if we merge it > as-is. It's up to the maintainers, of course, but I would be in favour > of merging as-is, then optionally backing out the default before the > final release if problems do turn up. But I would hope that the limits > are sufficiently conservative that it would not result in any problems :) > > -Toke >