I will change it to cpu_thread_in_core()
You are better than checkpatch.pl, will fix.
Right now it's 100% always giving us threads. My development version of
the patch had a BUG_ON() to check this. I expect this to stay the case
in the future as the name of the function is arch_scale_smt_power(),
which clearly denotes threads are expected.
I am not stuck on the names, I'll change it to sibling instead of cpu2
and sibling_map instead of cpu_map. It seems clear to me either way.
As for testing the ! case it seems funcationally equivalent, and mine
seems less confusing.
Having a ppc.md hook with exactly 1 user is pointless, especially since
you'll still have to calculate the weight with the ability to
dynamically disable smt.
It's every load balance, which is to say not hot, but fairly frequent.
I haven't been able to measure an impact from doing very hairy
calculations (without actually changing the weights) here vs not having
it at all in actual end workloads.
Yes :) Originally I had done different weightings for each of the 3
cases, which gained in some workloads but regressed some others. But
since I'm not doing that anymore I'll fold it down to > 1
--