I am working to port the code of a packet scheduler from OMNet++ to Linux kernel.In the OMNet++ code there is a formula which calculates the average rate change:
avg_rate = avg_rate - alpha*(avg_rate - cur_rate)
alpha is a float variable that takes values from 0 to 1.
Since I cannot use floating point operations in the kernel, how can I scale this formula, or use an integer value for alpha?