/usr/share/doc/libhwloc-doc/html/a00294.html is in libhwloc-doc 1.11.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Hardware Locality (hwloc): CPU and Memory Binding Overview</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Hardware Locality (hwloc)
 <span id="projectnumber">1.11.9</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">CPU and Memory Binding Overview </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Some operating systems do not systematically provide separate functions for CPU and memory binding. This means that CPU binding functions may have have effects on the memory binding policy. Likewise, changing the memory binding policy may change the CPU binding of the current thread. This is often not a problem for applications, so by default hwloc will make use of these functions when they provide better binding support.</p>
<p>If the application does not want the CPU binding to change when changing the memory policy, it needs to use the <a class="el" href="a00141.html#ggab00475fd98815bf4fb9aaf752030e7d2aad6b9eaf2ee324ca58dc8f58094b9997" title="Avoid any effect on CPU binding. ">HWLOC_MEMBIND_NOCPUBIND</a> flag to prevent hwloc from using OS functions which would change the CPU binding. Additionally, <a class="el" href="a00140.html#gga217dc8d373f8958cc93c154ebce1c71ca41ce440443cc3087caed95ab60edcad6" title="Avoid any effect on memory binding. ">HWLOC_CPUBIND_NOMEMBIND</a> can be passed to CPU binding function to prevent hwloc from using OS functions would change the memory binding policy. Of course, using these flags will reduce hwloc's overall support for binding, so their use is discouraged.</p>
<p>One can avoid using these flags but still closely control both memory and CPU binding by allocating memory, touching each page in the allocated memory, and then changing the CPU binding. The already-really-allocated memory will then be "locked" to physical memory and will not be migrated. Thus, even if the memory binding policy gets changed by the CPU binding order, the already-allocated memory will not change with it. When binding and allocating further memory, the CPU binding should be performed again in case the memory binding altered the previously-selected CPU binding.</p>
<p>Not all operating systems support the notion of a "current" memory binding policy for the current process, but such operating systems often still provide a way to allocate data on a given node set. Conversely, some operating systems support the notion of a "current" memory binding policy and do not permit allocating data on a specific node set without changing the current policy and allocate the data. To provide the most powerful coverage of these facilities, hwloc provides:</p>
<ul>
<li>
functions that set/get the current memory binding policies (if supported): hwloc_set/get_membind_*() and hwloc_set/get_proc_membind() </li>
<li>
functions that allocate memory bound to specific node set without changing the current memory binding policy (if supported): <a class="el" href="a00141.html#ga04736461780fadcf193af218c0122273" title="Allocate some memory on NUMA memory nodes specified by set. ">hwloc_alloc_membind()</a> and <a class="el" href="a00141.html#ga0ff3076f7f3633637699b809bcceceb1" title="Allocate some memory on NUMA memory nodes specified by nodeset. ">hwloc_alloc_membind_nodeset()</a>. </li>
<li>
helpers which, if needed, change the current memory binding policy of the process in order to obtain memory binding: <a class="el" href="a00141.html#gab1b77b8408bacaf03c7e8878f7577922" title="Allocate some memory on NUMA memory nodes specified by set. ">hwloc_alloc_membind_policy()</a> and <a class="el" href="a00141.html#ga7d473e80f11d774421688e36e9926136" title="Allocate some memory on NUMA memory nodes specified by nodeset. ">hwloc_alloc_membind_policy_nodeset()</a> </li>
</ul>
<p>An application can thus use the two first sets of functions if it wants to manage separately the global process binding policy and directed allocation, or use the third set of functions if it does not care about the process memory binding policy.</p>
<p>See <a class="el" href="a00140.html">CPU binding</a> and <a class="el" href="a00141.html">Memory binding</a> for hwloc's API functions regarding CPU and memory binding, respectively. There are some examples under doc/examples/ in the source tree. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
|