From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nbd.name (nbd.name [IPv6:2a01:4f8:131:30e2::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 14BEA3B25E for ; Thu, 8 Sep 2016 16:18:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=FnCnYQzhalDO4Ww+o1n+ON7nHIh5UF06YhaOhaAfFVI=; b=egAmd1TDN6bVCJy3cqcj4HYqzocz0oherctkZPVlVyV4x5e0QWHbc7vMYn9fFfIL2lg0Bdak6Hoz+9lvjrXYL+3vOcI1fF4laS+sk34mjPGI0tFnIYgmXjaCiWhx3cLVHyU2tfRTr1kG/Kdg85STm1p05HY0t8/dnkMwmR5Gt64=; To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , make-wifi-fast@lists.bufferbloat.net, linux-wireless@vger.kernel.org References: <20160908195915.31478-1-toke@toke.dk> From: Felix Fietkau Message-ID: <2663e4fb-bcdf-a872-f5ab-fac3bb5344c1@nbd.name> User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160908195915.31478-1-toke@toke.dk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 28 Nov 2016 08:47:10 -0500 Subject: Re: [Make-wifi-fast] [RFC] mac80211: Dynamically set CoDel parameters per station. 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: , Date: Thu, 08 Sep 2016 20:18:42 -0000 X-Original-Date: Thu, 8 Sep 2016 22:18:37 +0200 X-List-Received-Date: Thu, 08 Sep 2016 20:18:42 -0000 On 2016-09-08 21:59, Toke Høiland-Jørgensen wrote: > CoDel can be too aggressive if a station sends at a very low rate. This > gets worse the more stations are present, as each station gets more > bursty the longer the round-robin scheduling between stations takes. > > This is an attempt to dynamically adjust CoDel parameters per station. > It takes a rather simple approach and uses a simple binary designation > of a station as 'slow' if it has expected throughput less than eight > Mbps (i.e. the lowest couple of rates). In this case, CoDel is set to be > more lenient by adjusting its target to 50 ms and interval to 300 ms. > There's a built-in hysteresis so a station cannot flip between slow and > fast more than once every two seconds. > > In this version the check is performed every time a packet is enqueued > to the intermediate queues; and the overhead of doing this is alleviated > a bit by caching the result and by the above-mentioned hysteresis. It > can probably be smarter about both when and how to do the scaling, but > this seems to alleviate some of the starvation I've seen with very slow > stations. Since this is not dealing properly with firmware rate control anyway, I'd suggest calling the update from rate_control_set_rates in order to avoid putting more stuff into the tx hot path. You could add a separate code path to allow firmware rate control devices to provide a hint at a convenient point in time. - Felix