On Montag, 21. Mai 2018 15:17:11 CEST Linus Lüssing wrote:
> What is the advantage of using the ilog2 and shift operator here
> 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.

Kind regards,
        Sven

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to