From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 03A3D3B29E for ; Sat, 16 Nov 2019 06:55:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573905328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pocr9mxteUSNieGJ3i0GrJ3OYF+/Atfr3hbsYPy6vVA=; b=fyOiOZGzTstYu11u3rKgBmIuFwdNGMHfWoVoQb4Kkm7G6xW+yDGoeNclbwLg7BD03O0e9Y MhIEZaS3+nw5eGRg0nhJ+VbwPNPxEf81uBmtfZa6VxrbxNDrK7TQwCASHcMp/b5mkzJ4C5 7cdOZ/LdQnqGXPU9dXd//ISvbRz2M7A= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-2eygHyodPq6DsEODKNzHYg-1; Sat, 16 Nov 2019 06:55:27 -0500 Received: by mail-lj1-f199.google.com with SMTP id h9so2121877ljc.6 for ; Sat, 16 Nov 2019 03:55:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=n6c2pnbrFvBGhTNPEdW3eLVAGMawNGwiDmS2BKDIKsc=; b=dYVxuUPyb6/qjRIad07LxJuWlT+OerwIB0gYHFh4soIeP2qO1H3o1dKewEv4e3tibl zzP5eOdK1E/+/Mh36P7NB7M/GIiT2VFJ7UNvSivQn62cENg0INKQtAZoKBHsEvb+QW2f PKXnA/4rxmvjD8MPWhe13OvcqCilw8cA5jCjwbwUAzkao5NOfP+1aNr5NFwA7Tuz4jjg S7AR/6sTRW61yMPz5vGws4Ap4ttKEPB1GG8X/yTuh6GWOdpLQfb1yU2VJt2x/5NLJIGL 0OFvP/kJetnccfQBFW7XEmB7exKc+MeX9cJTHmlScLz4qzPokCdczMmreeovs38IK8aO O7og== X-Gm-Message-State: APjAAAU2tnwdLP5l9NWnUka/kWi87GjK8sppZ+fDfZ2d8tc6ZWcT/oJ0 GFqHlwYmaIoZVjjVkoHeC8AfG2lYdQHHyAFwvq/ZOEWihzUp0F4L5LgcrGdzsGtn5al4/ho15/z W5JFd2ZFNCS6O4vR0h9VgZLV1/Xw0xqAYKb4= X-Received: by 2002:a05:6512:1c3:: with SMTP id f3mr1144147lfp.25.1573905325640; Sat, 16 Nov 2019 03:55:25 -0800 (PST) X-Google-Smtp-Source: APXvYqwX+pIGhUsS/LCHnu6CdH7G0PaQC73fttIusOds0wbKPWxC4Nz0N/SiQfaz8Xc/AGJxAet2Wg== X-Received: by 2002:a05:6512:1c3:: with SMTP id f3mr1144130lfp.25.1573905325430; Sat, 16 Nov 2019 03:55:25 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a00:7660:6da:443::2]) by smtp.gmail.com with ESMTPSA id 4sm6212837lfa.95.2019.11.16.03.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 03:55:24 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id B0E3F181910; Sat, 16 Nov 2019 12:55:23 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Kan Yan Cc: Johannes Berg , linux-wireless , Make-Wifi-fast , ath10k@lists.infradead.org, John Crispin , Lorenzo Bianconi , Felix Fietkau , Rajkumar Manoharan , Kevin Hayes In-Reply-To: References: <157382403672.580235.12525941420808058808.stgit@toke.dk> <157382404118.580235.14216392299709793599.stgit@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Sat, 16 Nov 2019 12:55:23 +0100 Message-ID: <87y2wgjas4.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: 2eygHyodPq6DsEODKNzHYg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v9 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2019 11:55:29 -0000 Kan Yan writes: >> +static inline u16 >> +ieee80211_info_set_tx_time_est(struct ieee80211_tx_info *info, u16 tx_t= ime_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