11.6.3 cpuinfo_t

The cpuinfo_t structure defines a CPU. As Table 11.7, “sched Probe Arguments” indicates, arguments to both the enqueue and dequeue probes include a pointer to a cpuinfo_t. Additionally, the cpuinfo_t corresponding to the current CPU is pointed to by the curcpu variable. The definition of the cpuinfo_t structure is as follows:

typedef struct cpuinfo {
  processorid_t cpu_id;      /* CPU identifier */
  psetid_t cpu_pset;         /* not supported */
  chipid_t cpu_chip;         /* chip identifier */
  lgrp_id_t cpu_lgrp;        /* not supported */
  processor_info_t cpu_info; /* CPU information */
} cpuinfo_t;

cpu_id is the processor identifier.

cpu_chip is the identifier of the physical chip. Physical chips may contain several CPU cores.

cpu_info is the processor_info_t structure associated with the CPU.