[Make-wifi-fast] [PATCH v5] mac80211: Switch to a virtual time-based airtime scheduler
John Yates
john at yates-sheets.org
Mon Jan 6 17:19:58 EST 2020
On Mon, Jan 6, 2020 at 10:54 AM Toke Høiland-Jørgensen <toke at redhat.com> 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
More information about the Make-wifi-fast
mailing list