|
NAMEhwloc - General information about hwloc ("hardware locality").DESCRIPTIONhwloc provides command line tools and a C API to obtain the hierarchical map of key computing elements, such as: NUMA memory nodes, shared caches, processor packages, processor cores, and processor "threads". hwloc also gathers various attributes such as cache and memory information, and is portable across a variety of different operating systems and platforms.Definitionshwloc has some specific definitions for terms that are used in this man page and other hwloc documentation.
To be clear, hwloc supports all of the above concepts. It is simply worth noting that they are different things. Location SpecificationLocations refer to specific regions within a topology. Before reading the rest of this man page, it may be useful to read lstopo(1) and/or run lstopo on your machine to see the reported topology tree. Seeing and understanding a topology tree will definitely help in understanding the concepts that are discussed below.Locations can be specified in multiple ways:
"all" and "root" are special locations consisting in the root object in tree. It contains the entire current topology. Some tools directly operate on these objects (e.g. hwloc-info and hwloc-annotate). They do not support hexadecimal locations because each location may correspond to multiple objects. For instance, there can be exactly one L3 cache per package and NUMA node, which means it's the same location. If multiple locations are given on the command-line, these tools will operation on each location individually and consecutively. Some other tools internally manipulate objects as sets (e.g. hwloc-calc and hwloc-bind). They translate each input location into a hexidecimal location. When I/O objects are used, they are translated into the set of processors (or NUMA nodes) that are close to the given object (because I/O objects do not contain processors or NUMA nodes). If multiple locations are specified on the command-line (delimited by whitespace), they are combined (the overall location is wider). If prefixed with "~", the given location will be cleared instead of added to the current list of locations. If prefixed with "x", the given location will be and'ed instead of added to the current list. If prefixed with "^", the given location will be xor'ed. More complex operations may be performed by using hwloc-calc to compute intermediate values. hwloc ObjectsObjects in tuples can be any of the following strings (listed from "biggest" to "smallest"):
The additional system type can be used when several machines form an overall single system image (SSI), such as Kerrighed. osdev, pcidev, and bridge may also be used to specify special devices although some of them have dedicated identification ways as explained in Location Specification. Finally, note that an object can be denoted by its numeric "depth" in the topology graph. hwloc IndexesIndexes are integer values that uniquely specify a given object of a specific type. Indexes can be expressed either as logical values or physical values. Most hwloc utilities accept logical indexes by default. Passing --physical switches to physical/OS indexes. Both logical and physical indexes are described on this man page.Logical indexes are relative to the object order in the output from the lstopo command. They always start with 0 and increment by 1 for each successive object. Physical indexes are how the operating system refers to objects. Note that while physical indexes are non-negative integer values, the hardware and/or operating system may choose arbitrary values -- they may not start with 0, and successive objects may not have consecutive values. For example, if the first few lines of lstopo -p output are the following: Machine (47GB) NUMANode P#0 (24GB) + Package P#0 + L3 (12MB) L2 (256KB) + L1 (32KB) + Core P#0 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#1 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#2 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#8 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#9 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#10 + PU P#0 NUMANode P#1 (24GB) + Package P#1 + L3 (12MB) L2 (256KB) + L1 (32KB) + Core P#0 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#1 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#2 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#8 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#9 + PU P#0 L2 (256KB) + L1 (32KB) + Core P#10 + PU P#0 In this example, the first core on the second package is logically number 6 (i.e., logically the 7th core, starting from 0). Its physical index is 0, but note that another core also has a physical index of 0. Hence, physical indexes may only be relevant within the scope of their parent (or set of ancestors). In this example, to uniquely identify logical core 6 with physical indexes, you must specify (at a minimum) both a package and a core: package 1, core 0. Index values, regardless of whether they are logical or physical, can be expressed in several different forms (where X, Y, and N are positive integers):
REMEMBER: hwloc's command line tools accept logical indexes for location values by default. Use --physical and --logical to switch from one mode to another. SEE ALSOhwloc's command line tool documentation: lstopo(1), hwloc-bind(1), hwloc-calc(1), hwloc-distrib(1), hwloc-ps(1).hwloc has many C API functions, each of which have their own man page. Some top-level man pages are also provided, grouping similar functions together. A few good places to start might include: hwlocality_objects(3), hwlocality_types(3), hwlocality_creation(3), hwlocality_cpuset(3), hwlocality_information(3), and hwlocality_binding(3). For a listing of all available hwloc man pages, look at all "hwloc*" files in the man1 and man3 directories.
Visit the GSP FreeBSD Man Page Interface. |