On Montag, 21. Mai 2018 15:17:11 CEST Linus Lüssing wrote:
What is the advantage of using the ilog2 and shift
compared to plain multiplications and divisions?
They most likely ran into the problem that they must do a 64 bit division
(which cannot be done on 32 bit machines in the kernel directly with C's
native "x / y" statement ). But in this case, it is most likely a lot better
to use do_div (or similar function) to avoid a lot of rounding problems which
this shift approach has.