markfasheh / duperemove

Tools for deduping file systems
GNU General Public License v2.0
795 stars 80 forks source link

util.c assumes SMT ratio #243

Closed Jannik2099 closed 3 years ago

Jannik2099 commented 3 years ago

In util.c , get_core_count assumes SMT to have a ratio of 2 threads per 1 core. However there are lots of CPUs with different ratios outside of x86: POWER has 4 and 8, arm64 has 2 and 4, SPARC has 8, just to name a few.

Perhaps take a look at how lscpu from util-linux solves this - afraid my pity C skills won't be of help here

lorddoskias commented 3 years ago

If you have access to such a machine care to show me the output of your /sys/devices/system/cpu/cpu0/topology/thread_siblings_list file.