From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) (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 8B2F53B29D for ; Mon, 6 Jan 2020 17:20:11 -0500 (EST) Received: by mail-lf1-f66.google.com with SMTP id l18so29273066lfc.1 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=aVT+plsPGEmuO2oEFjFjF70oR55453M4BSS5xJhCvrlTP9dgjygqHFTFo9OUBHbfoa 5qPOM/Qlb2qhF4kKHGNTRB1ep7BviJWO6wnqqPUlYUVGIt/diCi46+fqHvnAJCuVbyIo VqzUI3OHOUfFZNPCQJFw+03V17SktoYPH/sSEmsmZ3ADT9L+6nitcxDPpRp59JUwan0O rxjI/7WcjXMsbJNxNBTpmu/WSbXiIkHCsYKD/Crre5R7o5RaCcrI2amPMVOZyE8BEWZQ IyQXXwx3hYKwuNzIUv9X+3R0zZYTPrvbCNXlMXCB3JPYbS88dDWvqsRjwkpMmWwLsCDb j+DA== X-Gm-Message-State: APjAAAVaFhIbqtMbR+J82onx196V1SqU4riBtOgfHQkzISD8QDlGwTFt AbjqOWhoxubLZ+yQQETkLG6+2Rti38i3IBE+p/I= X-Google-Smtp-Source: APXvYqy3vSWY4JvLwRKAiXT5YpGZiRCalqahNGOENEH6jPpVI90YArjvmaPMsfnwQXHy4HeZF83HNDZHWSawY1bAqXo= 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: 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: 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 22:20:11 -0000 On Mon, Jan 6, 2020 at 10:54 AM Toke H=C3=B8iland-J=C3=B8rgensen 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. Otherwis= e one tends to get multiple partial products and double width additions. Sti= ll, better than nearly any flavor of 64 bit divide. /john