On 18/08/2016 09:56, Vijay Kilari wrote: > The get_aarch_cpu_id() has check " if (unlikely(!cpu_info_read)) ". > If we call get_aarch_cpu_id() from is_thunderx_pass2_cpu() which is > called from inside the loop, we will be adding one additional check.
On the other hand, you are making an assumption that the caller of is_thunderx_pass2_cpu() calls get_aarch64_cpu_id() first, and not documenting it anywhere. And given that you shouldn't call _any_ function from inside such a hot loop, your solution is inferior on both counts. Paolo > What I observed is having extra check inside the loop is adding 100 to > 200ms overhead > on live migration time. So I added this variable extra is_thunderx_cpu > static variable > to make it simple single check.