Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp186548pja; Fri, 22 Nov 2019 05:12:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxdKmqr/eVW6rBnIyEZT2wH6rp1MpnABpwornzTcLaZlH8+WN46FEiJ30xVnSzkBXvyu4oX X-Received: by 2002:a17:906:9482:: with SMTP id t2mr5335733ejx.38.1574428329197; Fri, 22 Nov 2019 05:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574428329; cv=none; d=google.com; s=arc-20160816; b=D4xkz02bvxT37dLRJbR/P1Jy1ScW5ud9P591YV2eySnGvBLDsCkff08W6++tkkdJ42 av7agTqQdwqYmmcOqlCAisMaUI7HzTzLZI0XIEEZqPNBjayvBimhsXdpk37+wfoKqXfo sjHfislTf/ZO7WiDr1cnUcwQMT1lmS0nDxOcfcyzns0l8ZgPjMKRALnfZWMVjERilylp 2v1hJsESqubhq+jGSVqBSzTuHtwB74NUQyV9fAOegiTkESU2gYvVK0mvb01bO9ffpIFz M+x5q0vhZTZ8lW1IGHKHCsH1bf2rqETKEpDk/LPA8ttF4vW9Tmur71YpOGkjoRhO6Qla fwtw== 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:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=Ziz1rmhnoCtR1XnrQHB6g4sPV108o8irTuOGKgQ874U=; b=reX+YL6FbMp5RFV4WvP2e06W3qmNvqt+1ZtGmVSJCAH40XO8W2ehh9K/Wmrp7pb7E5 yUQOieLV4Hdo3i4UaeyGZ+lxvdf5+BPcKIIKk6ThqTDTWGHqNp95O2AkT5jb/Wutq4JU KBb1O+a1mElCn9QoHx7m/YT/zx7BTnk68Sb1iimjsd5YWPx1JrEEkx6CmpY/ajirhKZD FUOopT8NvBO4i7Ndkz+3dIxIfSOWaJckNOgqhKSymx7NNBkxcTJUGXMX7VLKFYHkjTpA VRv991/zTt6dZw8JyZs8g2oMONNz1JNbLu+/MsAc/Adg9/O5znSM+p2rznZzN9lZGbcj NyHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J325zoJj; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fx21si4108326ejb.254.2019.11.22.05.11.43; Fri, 22 Nov 2019 05:12:09 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=J325zoJj; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726836AbfKVNLZ (ORCPT + 99 others); Fri, 22 Nov 2019 08:11:25 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:59264 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726568AbfKVNLZ (ORCPT ); Fri, 22 Nov 2019 08:11:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574428283; 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=J325zoJjdEFCE2qRHe/YPhiJO70ZsAWi7q7y8gnVFY1TJ4qoYu9T+Muj1Q8qQBxAkrxYlW 10vUDH5oSKtUHeQFGX1vS+XhIR+eFpVmQLq7MNaCPZcnXxp0ZHENuHK6xjDcNbTU2DVWzs e56vxg9Bg3Yqa46NRsV4RN6FTPqFHpU= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-OFVpi6x9MKWF2A7IP_N8jw-1; Fri, 22 Nov 2019 08:11:21 -0500 Received: by mail-lf1-f69.google.com with SMTP id z16so1751445lfb.23 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=bY2KjoaDuLcYW2jng8vpX0BH6ThqwE4rbL8hwJ42airfKwfM59XD98ZnRZSBkswePY NjO+Rp59UXYo/u3Ws4dfQohunSOOro1L4XqvPKxrtAC1ZQAyBbY3gPXU/cZOkgsEEuAJ uCUkjReARyGvl9Qgq07fv584nOtZncy5rw3cc2eRTfzcc3j71tf5hbuBN4+U4BVWCd83 dBShRHc52kkvzLneLoQYHapLoDj1WIi0xujxO82feq4/zVoReQLiZcPdnS2EDE8LJlKK sagXsKNZz2ChwYTfFrc5U4BtX3BofRSmz/C5f6SivBLp9l6Q84Fe2ffNUwxE7qMnkLBw CWSA== X-Gm-Message-State: APjAAAW+wNoRkR7BON7Zgf9zUdwIhQEHH7BMEkqG/2PAgRw9EFGPpTc3 Lh3RICPMFJag2CY7eUEcUmmyxhiuZ35F1905IcEyPmE9Ao+lriqiFRSqeS1JxftrXNIX221fDju 10zVc2DKk8PY3BQySQCX8vLcGFCk= X-Received: by 2002:a2e:9104:: with SMTP id m4mr12589804ljg.63.1574428280254; Fri, 22 Nov 2019 05:11:20 -0800 (PST) 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 Subject: Re: [PATCH v11 2/4] mac80211: Import airtime calculation code from mt76 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: OFVpi6x9MKWF2A7IP_N8jw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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