From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id E188E3B2A4 for ; Thu, 27 Feb 2020 06:59:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582804764; 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=AvmyttG4tk/xXa9N2X38j1BClgCijPO+2y82fOk7ofQ=; b=CGU89tVg95YeGKFlMo4Slib/tPIvUgxbWr2Kq1JEXba2/lre5ZxzlqhzmmC6NDNk5il6yL gCgpnq5w09s/wlSz2OT2je6WwgEZ/ymrViYkFGJtYY07Gqv+eDGhcZiSeoPRHQe83hzjKN zpORhW41VTrjpV/OK7CRqkiVWrhLhj4= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-226-1Zx0_GUDMDuZEJ9crYx0FA-1; Thu, 27 Feb 2020 06:59:22 -0500 X-MC-Unique: 1Zx0_GUDMDuZEJ9crYx0FA-1 Received: by mail-lj1-f197.google.com with SMTP id g10so813526ljg.8 for ; Thu, 27 Feb 2020 03:59:22 -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:content-transfer-encoding; bh=tvWOj8GhzIrQBJYlKjhzfjzWLprj83uRktU1gXJnIBY=; b=BH176KH98VAX+2DRcmIiAE/xIwIO9Z+qe83shBm5gwF4MMzZZi7A+YDwNOBwjlexJK vupE8zI9cdexXhlthR5Wa3M10j4KPMTd0ttAi0tyhIuA7K8MmQ6HCsE8XCtnd5jLHG1Z txiBCHViJqBGUgs6h6SxMyMKZxF+54/67hUbp2ApYhOpi/qIX7fXrH1trLtSdjBAkfKi kmG+YnqfwcXmOmVSoq+RT15qMfDAOJkkxXIOPq2aWnkOYotffC3rzFeSR8kBw9B+dQ5e AlEXGuJDTCetoKNXJ19eunvkfUsjEZPlKitwDV6uybjuqrITJF/hssx9zdbW1pxYi7LI 6vaQ== X-Gm-Message-State: ANhLgQ09kn8Ji4p7rYkNgGF/I9MYkbUFc9TFzoTWHLERZTMlRqRpfXJp dKB9beUnB7ddkyd32V9i+i0BvAdQ1BLrVeoT9yqnkd/zyRdzsnQHHpEJNXa1KwiV9fHKamHU6Nt K7X8sZrHpm50S1VtdE2dQHBMn9biESri2XWI= X-Received: by 2002:a19:87:: with SMTP id 129mr1970022lfa.217.1582804761166; Thu, 27 Feb 2020 03:59:21 -0800 (PST) X-Google-Smtp-Source: ADFU+vscvrwvI+VIxLYFogI/O7O1aI5Y8wStH2CKVZdlGMcDvGeA15hyEByB1o6IEXSk7cmeKP/Mpg== X-Received: by 2002:a19:87:: with SMTP id 129mr1970014lfa.217.1582804760883; Thu, 27 Feb 2020 03:59:20 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id a28sm674276ljp.64.2020.02.27.03.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 03:59:20 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id BC8BC180362; Thu, 27 Feb 2020 12:59:19 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Felix Fietkau , Kan Yan , johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, yiboz@codeaurora.org, john@phrozen.org, lorenzo@kernel.org, rmanohar@codeaurora.org, kevinhayes@google.com In-Reply-To: <04284fb6-4a68-8449-4105-dcf90f128ef8@nbd.name> References: <20191119060610.76681-1-kyan@google.com> <20191119060610.76681-5-kyan@google.com> <789d592c-5b1b-b785-6d9c-86b7cc7d57f4@nbd.name> <87k149xbb4.fsf@toke.dk> <829b6b28-99cd-ea9d-fea3-603a10eae401@nbd.name> <875zfsxs0u.fsf@toke.dk> <04284fb6-4a68-8449-4105-dcf90f128ef8@nbd.name> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 27 Feb 2020 12:59:19 +0100 Message-ID: <874kvcw8a0.fsf@toke.dk> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v11 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: Thu, 27 Feb 2020 11:59:25 -0000 Felix Fietkau writes: > On 2020-02-27 11:07, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> Felix Fietkau writes: >>=20 >>> On 2020-02-26 22:56, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >>>> Felix Fietkau writes: >>>>> - We need an API that allows the driver to change the pending airtime >>>>> values, e.g. subtract estimated tx time for a packet. >>>>> mt76 an ath9k can queue packets inside the driver that are not curren= tly >>>>> in the hardware queues. Typically if the txqs have more data than wha= t >>>>> gets put into the hardware queue, both drivers will pull an extra fra= me >>>>> and queue it in its private txq struct. This frame will get used on t= he >>>>> next txq scheduling round for that particular station. >>>>> If you have lots of stations doing traffic (or having driver buffered >>>>> frames in powersave mode), this could use up a sizable chunk of the A= QL >>>>> budget. >>>>=20 >>>> I'm a bit more skeptical about this. If the driver buffers a bunch of >>>> packets that are not accounted that will hurt that station due to extr= a >>>> latency when it wakes up. For ath9k, this is the retry_q you're talkin= g >>>> about, right? The number of packets queued on that is fairly limited, >>>> isn't it? What kind of powersave buffering is the driver doing, and wh= y >>>> can't it leave the packets on the TXQ? That would allow them to be >>>> scheduled along with any new ones that might have arrived in the >>>> meantime, which would be a benefit for latency. >>> For mt76 there should be max. 1 frame in the retry queue, it's just a >>> frame that was pulled from the txq in a transmission attempt but that i= t >>> couldn't put in the hw queue because it didn't fit in the current >>> aggregate batch. >>=20 >> Wait, if it's only a single frame that is queued in the driver, how is >> this causing problems? We deliberately set the limit so there was a bit >> of slack above the size of an aggregate for things like this. Could you >> please describe in a bit more detail what symptoms you are seeing of >> this problem? :) > It would be a single frame per sta/txq. I don't know if it will cause > problems in practice, it's just a potential corner case that I found > during review. I'd imagine this would probably show up in some > benchmarks at least. > I'm not seeing any symptoms myself, but I also haven't run any intricate > tests yet. See my other reply; I'm not convinced this behaviour is wrong :) -Toke