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 652253B29D for ; Fri, 22 Nov 2019 08:11:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574428284; 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=Ziz1rmhnoCtR1XnrQHB6g4sPV108o8irTuOGKgQ874U=; b=fhKkC0P1FdOXAhA+6S3krAcemMo49Cq1H+fPexltDps2PcL0afR2Lo58I0VGH0KSOZ4dek MtK8kdurcYHBtlzsgDGO4nkfcYJf1AI0CwjKC8rhNtZg1F9gQs1hW4MxBsGj5YikR95Hw9 ZYs32H4pEV9Rr+cYlfvibwEr+b++1mE= 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-65-hS1CdxhyNaG7dQZInN8aAw-1; Fri, 22 Nov 2019 08:11:21 -0500 Received: by mail-lj1-f197.google.com with SMTP id u6so1305404ljg.8 for ; Fri, 22 Nov 2019 05:11:21 -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=SRjn5luqZhMXEn1fe3I15uR5OcZDdd+xXrV1J0vpkzM=; b=CdYGv35RjBGKXzJxAo8Mwkzwlwiy61UCek/eLmloNv/E7GjUSDf909KxSV24dtZT5q EPOpwbjpzBCq4cvDH0rmbQ5nbKgGClec1ksk+9BbhJXn4jcrGg/gzJ2Um3Oq+bUc4BmA UD1eE2WqxDPJ0ntuPFXLYp1Ga0Ehl/Z7pgR1JxynyFW3zGcmeKXhEapmVVenCqrQvPG1 U1T7XJUq0NtcR+fLa9pCU93aUhHTUa+deP4qsqt79iNMX22NEwkFm2r8PtQweG3Ca7A+ X0LEPBU3HfrbXmk9AGHDE2bgx0gO9Nntg0sX0C//Alcpo3K49oOUbXw4B5HFxy8gIxec LyEQ== X-Gm-Message-State: APjAAAW7FqlLpcPpEqDPLTf6e6amOImEXfVpxZsjOhUa0HghznrLI4RF UPr5l1pqJVlJMjRFzaqlNww+9w/dD1A5J0e0AkOfDrXpi8jwKUiKxPY+tQQV6XjCZOMJDCM+pc5 3OYWOW2JZbNNj5ZmI/hB02WWL8gRYTxDbWlw= X-Received: by 2002:a2e:9104:: with SMTP id m4mr12589799ljg.63.1574428280250; Fri, 22 Nov 2019 05:11:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzEMMFCPmNRYJYDLt08/wrK39XICDotm1W63bZGvjh38+wIjZXfT1jJroX8Yo9wK5RzadXg9A== X-Received: by 2002:a2e:9104:: with SMTP id m4mr12589785ljg.63.1574428280109; Fri, 22 Nov 2019 05:11:20 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id d26sm3342002ljo.54.2019.11.22.05.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 05:11:19 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id A99581800B9; Fri, 22 Nov 2019 14:11:18 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg , Kan Yan Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, nbd@nbd.name, yiboz@codeaurora.org, john@phrozen.org, lorenzo@kernel.org, rmanohar@codeaurora.org, kevinhayes@google.com In-Reply-To: References: <20191119060610.76681-1-kyan@google.com> <20191119060610.76681-3-kyan@google.com> <3e7bea0cc643714ec90978a7999022544a39b118.camel@sipsolutions.net> <87tv6w3w92.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 22 Nov 2019 14:11:18 +0100 Message-ID: <87imnc3vk9.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: hS1CdxhyNaG7dQZInN8aAw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v11 2/4] mac80211: Import airtime calculation code from mt76 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: Fri, 22 Nov 2019 13:11:24 -0000 Johannes Berg writes: >> Well, one calculates bitrates while the other calculates airtime? ;) > > :) > >> But yeah, I get what you mean. I think Felix went through quite some >> pains to structure this code to avoid divisions in the fast path. I >> guess that is the main blocker for cfg80211_calculate_bitrate() to be >> used instead (assuming we do want to consolidate them eventually). Not >> sure if that can be fixed easily though? > > We could also do it the other way around? as in bitrate =3D 1/airtime? Dunno, maybe? How important is precision to the bitrate calculations? > Or maybe we should keep both and use them as a sanity check for each > other :P Hmm, yeah, it should be possible to write a selftest to iterate through all rates and compare the output of each calculation, shouldn't it? Where would be a good place to put that? -Toke