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 [205.139.110.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 CD95C3B29D for ; Mon, 6 Jan 2020 10:20:06 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578324006; 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=DqajI1rJoz/pMgAaf193u+dGSlVbt/A6mH9+b3cUpi8=; b=FN/AVSRBNxJ/ngezEE4COEVix9zU+rVrsrTkxMUjuV5F9TJhTiV02tsQoyGJaXdncG7A8k Hl6FOFTgleygHoEQaXV3vNZRLUNGFt3HN5Umem+3iCoU38j3qZ6kqmpVqEKYQ0z23TIkGt G/s8+4AQJO+PRVbVWlsTLtuhsblJUfk= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-372-bsuWkV9YOwOPEeE4HtO6hA-1; Mon, 06 Jan 2020 10:20:04 -0500 Received: by mail-wr1-f70.google.com with SMTP id h30so18487046wrh.5 for ; Mon, 06 Jan 2020 07:20:04 -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=UblVWdJc4n/0gl7aQh/psh4RpiFlXhIRnt5gwjxTyuM=; b=LnNrzIsrD4JO/sXlMKchAzFxM4v0D/wSeSvCn9Kc9cq8X5McFY2yE9wBffiJKBn+7o dyfFm0z4d5I7WUpW7tsQ509JJl5RxIpUcjhBG0I/pQKTNJ0ZdfK2BiLnipyFg/Zw08mo LIwbhWsKFx2/YDBGoFHUJzrPh9cEJcVdF86JjxZdb4h94ovQ/I6wq3GyXtIR2IlztF5/ tMff9r960vPNWm8/EAv1YvQMuwpahDCcKogu7WZ+m4jFK9d4U6sMmGtdKT2CARzfYvrK nUVHxeRQB9fkOPnUiYF6xYSWDvofo0SomBZUceTbZg1NPjT7xnD4z3OyhJEC2UUIsBGZ Wqpw== X-Gm-Message-State: APjAAAW5gdDH/wLjkjzMLNsqkkp8E7IqUYMGSM4h2iv5me75KXVI06l1 umwWv5WFOfXDnZK3iESqynbqj1+zoCnS2fSY/0umNBZxWgDgIy7/pDCuwOxRcfAQu0yn/gPoFqi UXr/gRm1tQUXwU5aP+0oC3svEqFtoyRv8b00= X-Received: by 2002:a5d:56ca:: with SMTP id m10mr100889294wrw.313.1578324003764; Mon, 06 Jan 2020 07:20:03 -0800 (PST) X-Google-Smtp-Source: APXvYqyJof0Fmo3+7yd3GLwvMkbv0ZPUBM52GYZBVRnWsziRHi0+urnyb1BckDVFiso6nIxX2KN9vA== X-Received: by 2002:a5d:56ca:: with SMTP id m10mr100889279wrw.313.1578324003567; Mon, 06 Jan 2020 07:20:03 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id l15sm73359642wrv.39.2020.01.06.07.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 07:20:02 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 16BA6180ADA; Mon, 6 Jan 2020 16:20:02 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg , linux-wireless@vger.kernel.org Cc: Felix Fietkau , Rajkumar Manoharan , Kan Yan , make-wifi-fast@lists.bufferbloat.net, Yibo Zhao In-Reply-To: <5bab549a72d526f4fd0f708f14b49a7af6e2c0b9.camel@sipsolutions.net> References: <20191222172423.131033-1-toke@redhat.com> <5bab549a72d526f4fd0f708f14b49a7af6e2c0b9.camel@sipsolutions.net> X-Clacks-Overhead: GNU Terry Pratchett Date: Mon, 06 Jan 2020 16:20:02 +0100 Message-ID: <87r20ck3x9.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: bsuWkV9YOwOPEeE4HtO6hA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v5] mac80211: Switch to a virtual time-based airtime scheduler 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: Mon, 06 Jan 2020 15:20:06 -0000 Johannes Berg writes: > On Sun, 2019-12-22 at 18:24 +0100, Toke H=C3=B8iland-J=C3=B8rgensen wrote= : >> Didn't have a chance to >> do anything other than compile-test it yet, but wanted to get it out >> before the holidays (which I almost managed, since technically my >> holiday started two days ago)... > > Didn't help you much, I at least was already on vacation by then too > :P Yeah, well, I did say "almost". But at least it gave *me* peace of mind over the holidays :) >> @@ -1948,6 +1978,7 @@ void ieee80211_sta_update_pending_airtime(struct i= eee80211_local *local, >> =09=09=09 tx_pending, 0); >> } >> =20 >> + > > nit, what's that doing here? :) Pining for the fjords? >> +#define IEEE80211_RECIPROCAL_DIVISOR 0x100000000ULL >> +#define IEEE80211_RECIPROCAL_SHIFT 32 > > Could we live with less precision and use 32-bit arithmetic only? That > might help 32-bit systems? > > This is basically a 32.32 (31.32 for signed) fixed point number, right? > So I guess I'm asking if we could live with 16.16 (or 15.16), or > similar. Hmm, not sure. For the per-station weights, probably; I expect that in most cases individual station weights won't be big enough to cause rounding. However, the weight sum is a different matter. We go above a 10% rounding error once that goes above 2^13, which is certainly not unrealistic. The worst-case error is 50% if the weight sum happens to land at 2^15+1. The impact of a rounding error ends up being that a station's next transmission is delayed longer than it should be. As long as the rounding error is constant (i.e., the same set of stations keeps being active), this should cancel out, I guess; but since stations tend to cycle between being active and not, I fear it could end up impacting fairness to a measurable degree. So IDK; we could say we'll live with this in the interest of performance? Or we could decide the performance hit is worth keeping precision? Or do a middle ground thing where we use 32-bit arithmetic for the per-station weights, but go to 64-bit for the weight sum? I don't really have a good grip on how much of a performance impact we're talking about here, so I'm not sure which I prefer... > I think overall this looks good. I guess you should subject it to some > testing since I can't. Heh, yeah, testing is definitely needed :) I'm hoping Yibo will take it for a spin. If not, I'll try to see if I can get my old testbed to work; but I seem to recall there being a hardware issue with it, and I don't have physical access anymore, so it may be beyond rescue... -Toke