Copying a mask just to calculate a static value of siblings
is overkill, esp. if CPUMASK_OFFSTACK is set and the mask is huge,
additionally that'll workaround the incorrectness of kernel code
dealing with such a code until that is actually fixed upstream.
Change-Id: I860cc7d5b54adcde2e7622bfbc64b4e27046b083
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/13904
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
{
int num;
- mutex_lock(&cpt_data.cpt_mutex);
-
- cfs_cpu_ht_siblings(cpu, cpt_data.cpt_cpumask);
- num = cpus_weight(*cpt_data.cpt_cpumask);
-
- mutex_unlock(&cpt_data.cpt_mutex);
+ num = cpus_weight(*topology_thread_cpumask(cpu));
return num;
}