1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>find_next_best_node</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="ch04s03.html" title="More Memory Management Functions"><link rel="prev" href="API-nr-free-pagecache-pages.html" title="nr_free_pagecache_pages"><link rel="next" href="API-free-bootmem-with-active-regions.html" title="free_bootmem_with_active_regions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">find_next_best_node</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-nr-free-pagecache-pages.html">Prev</a> </td><th width="60%" align="center">More Memory Management Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-free-bootmem-with-active-regions.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-find-next-best-node"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>find_next_best_node — 2 find the next node that should appear in a given node's fallback list 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">find_next_best_node </b>(</code></td><td>int <var class="pdparam">node</var>, </td></tr><tr><td> </td><td>nodemask_t * <var class="pdparam">used_node_mask</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1124542124"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>node</code></em></span></dt><dd><p> 4 node whose fallback list we're appending 5 </p></dd><dt><span class="term"><em class="parameter"><code>used_node_mask</code></em></span></dt><dd><p> 6 nodemask_t of already used nodes 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1124544796"></a><h2>Description</h2><p> 8 We use a number of factors to determine which is the next node that should 9 appear on a given node's fallback list. The node should not have appeared 10 already in <em class="parameter"><code>node</code></em>'s fallback list, and it should be the next closest node 11 according to the distance array (which contains arbitrary distance values 12 from each node to each node in the system), and should also prefer nodes 13 with no CPUs, since presumably they'll have very little allocation pressure 14 on them otherwise. 15 It returns -1 if no node is found. 16</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-nr-free-pagecache-pages.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04s03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-free-bootmem-with-active-regions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">nr_free_pagecache_pages</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">free_bootmem_with_active_regions</span></td></tr></table></div></body></html> 17