Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7830779ybn; Mon, 30 Sep 2019 21:52:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtzjyHHA5qC+u/frnScvZAODuHI5soX1md8rCQXOvRBx3TR9aUsqCXTmacWqzdh9/Wp86P X-Received: by 2002:a17:906:c742:: with SMTP id fk2mr22403108ejb.44.1569905556300; Mon, 30 Sep 2019 21:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569905556; cv=none; d=google.com; s=arc-20160816; b=OxcqrqywxrjO0lK01IyOsPcXme/WSTPofOJNibfBpudHLRMAP3Pc40kJ+WgMqV6pso pCAFhf0ctIoDOD2DqnQZlALn0vbWO30yGp4/N/0lGEeaWELmEey6ErbyfeomJh9LcAXj Alj4z8Dmh416B3m3nV2O+A76liv1gtdGhM4yuYDKt9qXrPpVA5Pk+qqwsBHAK7zJvFQh I7WuaiXdDbuudrnnp17TClZ/oegu9EyqXZ1YRPHdXO5/Dwro/nK+iStv90GjhClUrcEK omHw/HuDj/ctLSvmQnrQeck2OHqAVYh00C4owW9ivguww/F3kIdSbu77i4PZF9Q64B0K KuDA== 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=JHQkAiHVzplCQNOguqdKc7eWlycFDXP/ryC23H4Nkww=; b=X9NQtcjviSzGdZLfNM/3ugamVg4Fv3KTMbXxY5SnIa1cpbhBVEgAxD81s/hzAabmur LydSkrskgY81NJPqosEF/00Ixi959d4SZ1PIxLCFJFB0m2yah+bVVDurHTmmsVc1Z5nf WMdgosPrX43oysOusXsdABDENNcy9BWEEac6xxsO14pGXjR1CSahWoL6+ZJvVZdU+wm3 ux7W6h0y/qfbgOkhKUGZfuWkbbbbjZDZZQp5fkTwJR+eLJT0ifFkpC1WmU06deSMtC4z LDWeK/iJH+VEsc7opho6HlMg0IRgu6oVeaNr9g/oRx88JjN0oxL0ikfEX4wTGsXvyyzI WBWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=JsZJ4R7B; 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 h3si8184233ejt.380.2019.09.30.21.51.51; Mon, 30 Sep 2019 21:52:36 -0700 (PDT) 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=JsZJ4R7B; 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 S1726784AbfJAErd (ORCPT + 99 others); Tue, 1 Oct 2019 00:47:33 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37483 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbfJAErc (ORCPT ); Tue, 1 Oct 2019 00:47:32 -0400 Received: by mail-lj1-f193.google.com with SMTP id l21so11852824lje.4 for ; Mon, 30 Sep 2019 21:47:30 -0700 (PDT) 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=JHQkAiHVzplCQNOguqdKc7eWlycFDXP/ryC23H4Nkww=; b=JsZJ4R7B0/0ow+5u7gyfyNAvbMYwrarKWczuQfRRL7p3w08ZQELjZP0eiJsxFLBOe6 NiMDVbwYWaJYApjOtRKZT2C+7cosLi0DZt0+wm5wqwtvbStLvFity/XTiSywSWe2CDT2 VZ6OGHAnKBSn5iIidq5dqKv794rIWbHdpNkMzbV1Cn9sICSAyKGayKzY2LrF6zTjsO0p ymoP/BMpuf4IYQaqioq//o6fcrVYYjEwg+hSJG5MmHq5c/QP1bgDRVxCbuKL47cCPalQ 1WHNvnoI74y2Q4Nh5brGs6sG4iPzgXY0s0D351+flALll/giSui+dvHTQpsdxhrl6U5b rmYA== 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=JHQkAiHVzplCQNOguqdKc7eWlycFDXP/ryC23H4Nkww=; b=BNOPB4drDO1JGpeFiMoLHw20GqO4WimiAxCgdgINpFvynD6dkjb7Nh2/vy1aKH8BeU LE11aelv1HGO2g3rAQoZmWFD58c7i7vXKoiGp0N7JjqHjfAvK0jx6KdZpgjkejyJ0k2I pEilAltglqgXLnxDjZVjGkxIh9ET2QvFM72FAg0mYjH48GNI8A4c3vObtWMG7Hfrtev9 YUiaK9A3yYGcn9oXQgsrshgl/woJq9YG83bt/YoRrzmiFy6YojndcVixutMyX/P/x50R rjm/awkRSX1/EyJCLEClRIbaUBhC/iDqhTze8CTbL5ljzE8sCMEX2UBNXTByuGCLvR2o PRgg== X-Gm-Message-State: APjAAAUzZ4P63jUysTOBssHi53M14FzRJhQQJA/ugQGDjjC1WNujTdz/ yems1wSxcw/YtZLqI5AQ5iO+k5bt1lNF/WfNnbRtYw== X-Received: by 2002:a2e:9a03:: with SMTP id o3mr12593946lji.51.1569905249764; Mon, 30 Sep 2019 21:47:29 -0700 (PDT) MIME-Version: 1.0 References: <156889576422.191202.5906619710809654631.stgit@alrua-x1> <156889576869.191202.510507546538322707.stgit@alrua-x1> <08f0ed6e-b746-9689-6dc8-7c0ea705666d@nbd.name> <87wodv19jl.fsf@toke.dk> <87tv8z13wv.fsf@toke.dk> <87r2421d4f.fsf@toke.dk> <87muemykqn.fsf@toke.dk> In-Reply-To: <87muemykqn.fsf@toke.dk> From: Kan Yan Date: Mon, 30 Sep 2019 21:47:18 -0700 Message-ID: Subject: Re: [PATCH RFC/RFT 4/4] mac80211: Apply Airtime-based Queue Limit (AQL) on packet dequeue To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Yibo Zhao , Felix Fietkau , Johannes Berg , linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, John Crispin , Lorenzo Bianconi , linux-wireless-owner@vger.kernel.org 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 guess the risk is lower when with a 24ms per-iface limit; but with > enough stations I guess it could still happen, no? So we should probably > handle this case... Each txq (per sta, per tid) is allowed to release at least the lower AQL limit amount of packet (default 4ms), which is not affected by other station's PS behavior and 4ms should be sufficient for most use cases. The 24ms per-interface limit is an optimization to get good benchmark score in peak performance test, which usually only involve 1-2 stations. The higher limit probably won't matter anymore when there are many stations. I haven't noticed side effects due to PS behavior in the ChromiumOS version. Still, it is better to be able to take frames in PS queue in to account, > Cool. Are you going to submit a ported version of your implementation? > Then we can work from the two submissions and see if we can't converge > on something... Working on porting, should have something ready before the end of this week= . On Sun, Sep 29, 2019 at 12:18 PM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Kan Yan writes: > > >> No, ath10k would continue to do what it was always doing. Drivers that > >> can report after-the-fact airtime usage per-frame (like ath9k) will > >> continue to do that. In both of those cases, the airtime estimate is > >> only used to throttle the queue, not to schedule for fairness. > > You are right, I didn't realize ath9k reports per frame airtime usage. > > > >> Yeah, I was wondering about that. Makes sense. Why 24ms, exactly? > > The per interface 24 ms queue limit is an empirical number that works > > well for both achieve low latency when there is a lot of stations and > > get high throughput when there is only 1-2 stations. We could make it > > configurable. > > Right. "Found by trial and error" is a fine answer as far as I'm > concerned :) > > But yeah, this should probably be configurable, like BQL is. > > >> BTW, I think Felix' concern about powersave was in relation to AQL: If > >> we don't handle power save in that, we can end up in a situation where > >>the budget for packets allowed to be queued in the firmware is taken up > >> entirely by stations that are currently in powersave mode; which would > >> throttle the device completely. So we should take that into account fo= r > >> AQL; for the fairness scheduler, stations in powersave are already > >> unscheduled, so that should be fine. > > I think the accounting for the airtime of frames in the power saving > > queue could affect both the fairness scheduler and AQL. > > For chipset with firmware offload, PS handling is mostly done by > > firmware, so host driver's knowledge of PS state could be slightly > > out-of-dated. The power save behavior also make it harder to the > > airtime_weight correct for the fairness scheduler. > > Hmm, maybe. I'm not sure how significant this effect would be, but I > guess we'll need to find out :) > > > > Powersave mode's impact to AQL is much smaller. The lower per station > > queue limit is not impacted by other stations PS behavior, since the > > estimated future airtime is not weighted for other stations and a > > station won't get blocked due to others stations in PS mode. > > Station in PS mode do affects AQL's higher per interface limit, but in > > an inconsequential way. The per interface AQL queue limit is quite > > large (24 ms), hence airtime from packets in PS queue is unlikely to > > have a significant impact on it. Still, it will be better if the > > packet in power saving queue can be taken into account. > > I guess the risk is lower when with a 24ms per-iface limit; but with > enough stations I guess it could still happen, no? So we should probably > handle this case... > > >> > make it easier to schedule multiple stations, I think it has some me= rit > >> > that makes it worth trying out. We should probably get the AQL stuff > >> > done first, though, and try the virtual time scheduler on top of tha= t. > >> Agree that we should get the AQL stuff done first since I believe it > >> will help to fix the issue mentioned above. > > That sounds like a good plan. The virtual time scheduler is more > > involved and will take more work to get it right. It make sense to get > > AQL done first. > > Cool. Are you going to submit a ported version of your implementation? > Then we can work from the two submissions and see if we can't converge > on something... > > -Toke >