threads

file: /proc/sys/kernel/threads
variable: kernel.threads
Official reference

A thread is a single scheduling unit. It’s the equivalent to a logical Linux CPU.

AMDs nomenclature for CMT threads is “Compute Unit Core”. The kernel always uses “thread”.

Thread-related topology information in the kernel:

  • topology_core_cpumask():

    The cpumask contains all online threads in the package to which a thread belongs.

    The number of online threads is also printed in /proc/cpuinfo “siblings.”

  • topology_sibling_cpumask():

    The cpumask contains all online threads in the core to which a thread belongs.

  • topology_logical_package_id():

    The logical package ID to which a thread belongs.

  • topology_physical_package_id():

    The physical package ID to which a thread belongs.

  • topology_core_id();

    The ID of the core to which a thread belongs. It is also printed in /proc/cpuinfo “core_id.”

  • topology_logical_core_id();

    The logical core ID to which a thread belongs.