diff options
author | 2024-03-03 10:24:09 +0100 | |
---|---|---|
committer | 2024-03-12 13:09:22 -0700 | |
commit | 8c86fb68ffcb0d8a5418e171c8d359d712912e9b (patch) | |
tree | 5d19b4a82cc54d1c036f9f855691fa7946bb56ca /tools/perf/scripts/python | |
parent | kexec: copy only happens before uchunk goes to zero (diff) | |
download | wireguard-linux-8c86fb68ffcb0d8a5418e171c8d359d712912e9b.tar.xz wireguard-linux-8c86fb68ffcb0d8a5418e171c8d359d712912e9b.zip |
mul_u64_u64_div_u64: increase precision by conditionally swapping a and b
As indicated in the added comment, the algorithm works better if b is big.
As multiplication is commutative, a and b can be swapped. Do this if a
is bigger than b.
Link: https://lkml.kernel.org/r/20240303092408.662449-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions