Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21930270ybl; Mon, 6 Jan 2020 14:20:46 -0800 (PST) X-Google-Smtp-Source: APXvYqxbD8MiDK0dIT9keF/GLN1yBWP4pdCLGSAgZiOSfg98z7JnztwhD9n7wQNvGc+nYv5BOf3w X-Received: by 2002:a05:6830:1487:: with SMTP id s7mr92953275otq.269.1578349246501; Mon, 06 Jan 2020 14:20:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578349246; cv=none; d=google.com; s=arc-20160816; b=f30U7xQ2OJPF6uXmnG78m+bxW3UolSQuxw0ayVDBXHJlXMI0gwYhF68QKPgmVfrsdq d4bKOcCi5C5XrjI0oBbauSTbnN6W2cBMhjyTW/ZfrctSK2mCu8Jz061uIriG2Kc3oEkF XiXx0n2O02RiWXZrz+IzpVSMiG4MGL2w/JxvH7+6P30Uidkvkp15Id83AK6gMCTwN1zu yvO8nu5VxThCCciF16f/rp7JaUV9tQY3XJA6nrk49pDVeGxyoOW1fpr8gifVArgAxwL4 P/pSKeIzK7l2i47tlx00lU+99oN4QRZAWf9OQcOgEKmvdBu908iah5Wt2Ei6VXmzKGnO SSBA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Tl+gISg6iCbpCzTC16sk4vOHhLXVW7sReUuTU54Niig=; b=qSkoTM/wDq0poGjEzfIXkdRmmPETeMG1H56MEHPGMDN0UHRQyJwI7xrba4fNlg4Xqj RMIl5y6SPX3da+SHvwS87YClQd5KQlTW6WK+TxWaQvo5SDLk8I6XqzGVlmMJPWY3TKwy MX5Znp0M0nOAwG1ki8OZW5o6b7QnJQ26F2nq9ypoUa3KLc/oQJHXUZQXkXavNWiNCT2+ jmAvFdulzAwkWg/V1PHmm4AO/jmpG3pzIixBQl6ebeGW8GBmceSK1MpQ3qe2fUE6Dsid FgQGHygUyCvKC0hBwOI/qPcM1fvQFl+Ym0K0ySvks9oc8+WTksMtfHE9tpyjg4mYVK54 aQuw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186si34778758oig.241.2020.01.06.14.20.28; Mon, 06 Jan 2020 14:20:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727025AbgAFWUM convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Jan 2020 17:20:12 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42930 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbgAFWUM (ORCPT ); Mon, 6 Jan 2020 17:20:12 -0500 Received: by mail-lf1-f66.google.com with SMTP id y19so37408166lfl.9 for ; Mon, 06 Jan 2020 14:20:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=psNd5SDAxN8kmAqWfEDCIqtkY8hu3ItV7K5NPbyFLwo=; b=Nqy04B5+6dW3Vz2MsI7XBcQMGyo0gV428StwyUU65pBtZz+pJitCs4KMuNaXC7utwB XvFtBp4aU2G/cBue+xWQADJkOZhy6EsOFROTz7lFtYMs3ShZVIQ7PXzJac0RJRwg+jH8 hVDXJMLEyiKZqGvGa+gztbROKIG8ekkL3M7iHR1Ex87EC+TNSDTgjSnv1MVCVrToBsu8 rpgzUkAnnSgnYhfe0oe6RkHnBDEP8/chMvLd/gdvzN6OsoAWwH2UapnaVAOJJ8zbASRp SLJGIZKORZ2Cv2wUyEUWG7WoKAy1ZREeINeciKwINHtTkPyvPLV7yHdqrsQNJuKAxlhF kTlw== X-Gm-Message-State: APjAAAWiLPciqw3NCwGDokDO9gFExZBXAnNf/DdjIAaVVV+ruZwuEEqu C75lGoNUhjm7TWPIMgBbCGotjybfq5Sv92K75UU= X-Received: by 2002:ac2:47ec:: with SMTP id b12mr55159530lfp.162.1578349210465; Mon, 06 Jan 2020 14:20:10 -0800 (PST) MIME-Version: 1.0 References: <20191222172423.131033-1-toke@redhat.com> <5bab549a72d526f4fd0f708f14b49a7af6e2c0b9.camel@sipsolutions.net> <87r20ck3x9.fsf@toke.dk> <87mub0k2cd.fsf@toke.dk> In-Reply-To: <87mub0k2cd.fsf@toke.dk> From: John Yates Date: Mon, 6 Jan 2020 17:19:58 -0500 Message-ID: Subject: Re: [Make-wifi-fast] [PATCH v5] mac80211: Switch to a virtual time-based airtime scheduler To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Johannes Berg , linux-wireless , Kan Yan , Make-Wifi-fast , Yibo Zhao , Rajkumar Manoharan , Felix Fietkau Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, Jan 6, 2020 at 10:54 AM Toke Høiland-Jørgensen wrote: > Yeah, we'd be doing the accumulation in 64bit values in any case; we're > talking about mainly multiplication here (the whole point of the > reciprocal stuff is to get the division out of the fast path). So how > big of an impact is one (or two) extra 64-bit multiplications going to > have on a 32bit platform? Top line: usually replacing 64 bit divide with multiply is a massive win. Many platforms make (32 bits * 32 bits) -> 64 bits quite cheap: - x86 has this as a single instruction: eax * edx -> eax:edx - arm has much the same, plus a variant that tacks ona 64 bit accumulation! - mips leaves the 64 bit product in a dedicated register; retrieval requires 2 instructions - ppc, being more "RISCy", has two instruction: mullo and mulhi (performs multiply twice!) Best case is when the compiler can recognize a 64 bit multiply as really widen_32_to_64(left) x widen_32_to_64(right) -> 64_bit_product In such a case only one of the above multiply cases is necessary. Otherwise one tends to get multiple partial products and double width additions. Still, better than nearly any flavor of 64 bit divide. /john