Hi all
Please find the patch for Save extra cpu cycles in getting slow/fast domain(Commit ID : 2926ff354657c02ad4e1c453138f8670d031d7c4)
Description:
In present code, it is compulsory to check if the cpu is in slowest/fastest domain before calling the functions;
hmp_slower_domain() and hmp_faster_domain() to get the relative slower/faster domains.
If the caller calls without checking, it will give invlaid address which can result in undefined behavior.
Also in the functions
hmp_select_slower_cpu(), hmp_select_faster_cpu() and hmp_best_little_cpu(),
extra cpu cycles and instructions can be saved by changing the flow to get the relative slower/faster domain. As with this change the function hmp_slower_domain() and hmp_faster_domain() will itself take care of the condition if the current cpu is in slowest or fastest domain. So extra checks before getting the relative faster/slower domains can be avoided thus reducing function calls and prevent cpu cycles thus improving the performance.
Regards Gaurav Jindal +91-8800803297 CPCEX ID: gaurav.j