~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/cputopo.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __PERF_CPUTOPO_H
  3 #define __PERF_CPUTOPO_H
  4 
  5 #include <linux/types.h>
  6 
  7 struct cpu_topology {
  8         /* The number of unique package_cpus_lists below. */
  9         u32       package_cpus_lists;
 10         /* The number of unique die_cpu_lists below. */
 11         u32       die_cpus_lists;
 12         /* The number of unique core_cpu_lists below. */
 13         u32       core_cpus_lists;
 14         /*
 15          * An array of strings where each string is unique and read from
 16          * /sys/devices/system/cpu/cpuX/topology/package_cpus_list. From the ABI
 17          * each of these is a human-readable list of CPUs sharing the same
 18          * physical_package_id. The format is like 0-3, 8-11, 14,17.
 19          */
 20         const char **package_cpus_list;
 21         /*
 22          * An array of string where each string is unique and from
 23          * /sys/devices/system/cpu/cpuX/topology/die_cpus_list. From the ABI
 24          * each of these is a human-readable list of CPUs within the same die.
 25          * The format is like 0-3, 8-11, 14,17.
 26          */
 27         const char **die_cpus_list;
 28         /*
 29          * An array of string where each string is unique and from
 30          * /sys/devices/system/cpu/cpuX/topology/core_cpus_list. From the ABI
 31          * each of these is a human-readable list of CPUs within the same
 32          * core. The format is like 0-3, 8-11, 14,17.
 33          */
 34         const char **core_cpus_list;
 35 };
 36 
 37 struct numa_topology_node {
 38         char            *cpus;
 39         u32              node;
 40         u64              mem_total;
 41         u64              mem_free;
 42 };
 43 
 44 struct numa_topology {
 45         u32                             nr;
 46         struct numa_topology_node       nodes[];
 47 };
 48 
 49 struct hybrid_topology_node {
 50         char            *pmu_name;
 51         char            *cpus;
 52 };
 53 
 54 struct hybrid_topology {
 55         u32                             nr;
 56         struct hybrid_topology_node     nodes[];
 57 };
 58 
 59 /*
 60  * The topology for online CPUs, lazily created.
 61  */
 62 const struct cpu_topology *online_topology(void);
 63 
 64 struct cpu_topology *cpu_topology__new(void);
 65 void cpu_topology__delete(struct cpu_topology *tp);
 66 /* Determine from the core list whether SMT was enabled. */
 67 bool cpu_topology__smt_on(const struct cpu_topology *topology);
 68 /* Are the sets of SMT siblings all enabled or all disabled in user_requested_cpus. */
 69 bool cpu_topology__core_wide(const struct cpu_topology *topology,
 70                              const char *user_requested_cpu_list);
 71 
 72 struct numa_topology *numa_topology__new(void);
 73 void numa_topology__delete(struct numa_topology *tp);
 74 
 75 struct hybrid_topology *hybrid_topology__new(void);
 76 void hybrid_topology__delete(struct hybrid_topology *tp);
 77 
 78 #endif /* __PERF_CPUTOPO_H */
 79 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php