Skip to content

Commit

Permalink
doc: don't talk about "logical processors" too much
Browse files Browse the repository at this point in the history
There was some confusion recently between "logical processor",
"logical index" (not) being used in CPUset because
"logical processors" was used somewhere nearby a CPUset explanation.

Only talk about "logical processors" when defining resources/terms,
not anywhere else unneeded.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Apr 29, 2020
1 parent 0ec7b93 commit a4411fd
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 27 deletions.
19 changes: 9 additions & 10 deletions doc/hwloc.doxy
Expand Up @@ -520,14 +520,13 @@ Make sure to have had a look at those too!
into a tree (see \ref termsanddefs_tree).
</dd>

<dt>Processing Unit (or Logical Processor)</dt>
<dt>Processing Unit (PU)</dt>
<dd>The smallest processing element that can be represented by a hwloc
object. It may be a single-core processor, a core of a multicore
processor, or a single thread in a SMT processor.
processor, or a single thread in a SMT processor
(also sometimes called "Logical processor",
not to be confused with "Logical index of a processor").
hwloc's PU acronym stands for Processing Unit.

"Logical processor" should not be confused with "Logical index of a
processor".
</dd>

<dt>Package</dt>
Expand Down Expand Up @@ -596,8 +595,8 @@ Make sure to have had a look at those too!
See also \ref faq_indexes.</dd>

<dt>CPU set</dt>
<dd>The set of logical processors (or processing units) logically included in an object
(if it makes sense). They are always expressed using physical logical
<dd>The set of processing units (PU) logically included in an object
(if it makes sense). They are always expressed using physical
processor numbers (as announced by the OS). They are implemented as the
::hwloc_bitmap_t opaque structure. hwloc CPU sets are just masks, they
do \em not have any relation with an operating system actual binding notion like
Expand Down Expand Up @@ -2933,7 +2932,7 @@ except I/Os and instruction caches.

One of the original reasons why hwloc was created is that <b>physical/OS indexes</b>
(<tt>obj->os_index</tt>) are often crazy and unpredictable:
logical processors numbers are usually
processors numbers are usually
non-contiguous (processors 0 and 1 are not physically close), they vary from
one machine to another, and may even change after a BIOS or system update.
This numbers make task placement hardly portable.
Expand Down Expand Up @@ -3573,12 +3572,12 @@ under <tt>contrib/windows/</tt>.
The NetBSD (and FreeBSD) backend uses x86-specific topology discovery
(through the x86 component).
This implementation requires CPU binding so as to query topology
information from each individual logical processor.
information from each individual processor.
This means that hwloc cannot find any useful topology information
unless user-level process binding is allowed by the NetBSD kernel.
The <tt>security.models.extensions.user_set_cpu_affinity</tt>
sysctl variable must be set to 1 to do so.
Otherwise, only the number of logical processors will be detected.
Otherwise, only the number of processors will be detected.


\subsection faq_aix_bind Why does binding fail on AIX?
Expand Down
4 changes: 2 additions & 2 deletions include/hwloc.h
Expand Up @@ -196,7 +196,7 @@ typedef enum {
*/
HWLOC_OBJ_CORE, /**< \brief Core.
* A computation unit (may be shared by several
* logical processors).
* PUs, aka logical processors).
*/
HWLOC_OBJ_PU, /**< \brief Processing Unit, or (Logical) Processor.
* An execution unit (may share a core with some
Expand Down Expand Up @@ -512,7 +512,7 @@ struct hwloc_obj {
*
* \note Its value must not be changed, hwloc_bitmap_dup() must be used instead.
*/
hwloc_cpuset_t complete_cpuset; /**< \brief The complete CPU set of logical processors of this object,
hwloc_cpuset_t complete_cpuset; /**< \brief The complete CPU set of processors of this object,
*
* This may include not only the same as the cpuset field, but also some CPUs for
* which topology information is unknown or incomplete, some offlines CPUs, and
Expand Down
4 changes: 2 additions & 2 deletions include/hwloc/bitmap.h
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2018 Inria. All rights reserved.
* Copyright © 2009-2020 Inria. All rights reserved.
* Copyright © 2009-2012 Université Bordeaux
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
Expand Down Expand Up @@ -231,7 +231,7 @@ HWLOC_DECLSPEC int hwloc_bitmap_clr_range(hwloc_bitmap_t bitmap, unsigned begin,
/** \brief Keep a single index among those set in bitmap \p bitmap
*
* May be useful before binding so that the process does not
* have a chance of migrating between multiple logical CPUs
* have a chance of migrating between multiple processors
* in the original mask.
* Instead of running the task on any PU inside the given CPU set,
* the operating system scheduler will be forced to run it on a single
Expand Down
4 changes: 2 additions & 2 deletions include/hwloc/cuda.h
@@ -1,5 +1,5 @@
/*
* Copyright © 2010-2017 Inria. All rights reserved.
* Copyright © 2010-2020 Inria. All rights reserved.
* Copyright © 2010-2011 Université Bordeaux
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
Expand Down Expand Up @@ -72,7 +72,7 @@ hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused
return 0;
}

/** \brief Get the CPU set of logical processors that are physically
/** \brief Get the CPU set of processors that are physically
* close to device \p cudevice.
*
* Return the CPU set describing the locality of the CUDA device \p cudevice.
Expand Down
4 changes: 2 additions & 2 deletions include/hwloc/cudart.h
@@ -1,5 +1,5 @@
/*
* Copyright © 2010-2017 Inria. All rights reserved.
* Copyright © 2010-2020 Inria. All rights reserved.
* Copyright © 2010-2011 Université Bordeaux
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
Expand Down Expand Up @@ -69,7 +69,7 @@ hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unus
return 0;
}

/** \brief Get the CPU set of logical processors that are physically
/** \brief Get the CPU set of processors that are physically
* close to device \p idx.
*
* Return the CPU set describing the locality of the CUDA device
Expand Down
6 changes: 3 additions & 3 deletions include/hwloc/helper.h
Expand Up @@ -919,7 +919,7 @@ hwloc_distrib(hwloc_topology_t topology,

/** \brief Get complete CPU set
*
* \return the complete CPU set of logical processors of the system.
* \return the complete CPU set of processors of the system.
*
* \note The returned cpuset is not newly allocated and should thus not be
* changed or freed; hwloc_bitmap_dup() must be used to obtain a local copy.
Expand All @@ -931,7 +931,7 @@ hwloc_topology_get_complete_cpuset(hwloc_topology_t topology) __hwloc_attribute_

/** \brief Get topology CPU set
*
* \return the CPU set of logical processors of the system for which hwloc
* \return the CPU set of processors of the system for which hwloc
* provides topology information. This is equivalent to the cpuset of the
* system object.
*
Expand All @@ -945,7 +945,7 @@ hwloc_topology_get_topology_cpuset(hwloc_topology_t topology) __hwloc_attribute_

/** \brief Get allowed CPU set
*
* \return the CPU set of allowed logical processors of the system.
* \return the CPU set of allowed processors of the system.
*
* \note If the topology flag ::HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED was not set,
* this is identical to hwloc_topology_get_topology_cpuset(), which means
Expand Down
4 changes: 2 additions & 2 deletions include/hwloc/nvml.h
@@ -1,5 +1,5 @@
/*
* Copyright © 2012-2016 Inria. All rights reserved.
* Copyright © 2012-2020 Inria. All rights reserved.
* See COPYING in top-level directory.
*/

Expand Down Expand Up @@ -36,7 +36,7 @@ extern "C" {
* @{
*/

/** \brief Get the CPU set of logical processors that are physically
/** \brief Get the CPU set of processors that are physically
* close to NVML device \p device.
*
* Return the CPU set describing the locality of the NVML device \p device.
Expand Down
4 changes: 2 additions & 2 deletions include/hwloc/opencl.h
@@ -1,5 +1,5 @@
/*
* Copyright © 2012-2019 Inria. All rights reserved.
* Copyright © 2012-2020 Inria. All rights reserved.
* Copyright © 2013, 2018 Université Bordeaux. All right reserved.
* See COPYING in top-level directory.
*/
Expand Down Expand Up @@ -109,7 +109,7 @@ hwloc_opencl_get_device_pci_busid(cl_device_id device,
return -1;
}

/** \brief Get the CPU set of logical processors that are physically
/** \brief Get the CPU set of processors that are physically
* close to OpenCL device \p device.
*
* Return the CPU set describing the locality of the OpenCL device \p device.
Expand Down
4 changes: 2 additions & 2 deletions include/hwloc/openfabrics-verbs.h
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2016 Inria. All rights reserved.
* Copyright © 2009-2020 Inria. All rights reserved.
* Copyright © 2009-2010 Université Bordeaux
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
Expand Down Expand Up @@ -41,7 +41,7 @@ extern "C" {
* @{
*/

/** \brief Get the CPU set of logical processors that are physically
/** \brief Get the CPU set of processors that are physically
* close to device \p ibdev.
*
* Return the CPU set describing the locality of the OpenFabrics
Expand Down

0 comments on commit a4411fd

Please sign in to comment.