Micro-optimize congestion control for 32bit CPUs?
Right now, once every 31 cells, we do some 64bit math in the congestion control code.
This math is concentrated in congestion_control_update_circuit_estimates()
and the functions that it calls. The bulk of it is in congestion_control_update_circuit_bdp()
.
However, before we start reducing every single field or return value to 32 bit, we should see if disabling the code for other BDP estimations eliminates the effect in profiles. Here's the ticket for disabling those estimators: #40566 (closed)
Anything more than simply disabling the unused BDP estimators is extremely risky, as these operations involve microsecond RTT values, large BDP values. and multiplicative scaling factors. 32bit is extremely likely to overflow here.
Note also that the number of 32 bit systems is vanishing. New ARM CPUs will soon not even run 32bit code, and Android began requiring 64bit builds of all apps on August 1st of last year. https://www.gsmarena.com/arm_will_drop_32bit_support_in_the_big_cortexa_cores_starting_in_2022-news-45688.php https://www.androidauthority.com/arm-32-vs-64-bit-explained-1232065/
So if we do this, we should bear in mind that it only matters for EOL Androids, and wifi routers. And we should probably use some actual market research to determine if we care about those devices.
It's my understanding that @ahf did some of this profiling before, so Cc'ing him. But warning, @ahf, I would consult duncan before going on this quest.