'\" t .\" Title: find_next_best_node .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Memory Management in Linux .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "FIND_NEXT_BEST_NODE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Memory Management in Linux" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" find_next_best_node \- find the next node that should appear in a given node\*(Aqs fallback list .SH "SYNOPSIS" .HP \w'int\ find_next_best_node('u .BI "int find_next_best_node(int\ " "node" ", nodemask_t\ *\ " "used_node_mask" ");" .SH "ARGUMENTS" .PP \fInode\fR .RS 4 node whose fallback list we\*(Aqre appending .RE .PP \fIused_node_mask\fR .RS 4 nodemask_t of already used nodes .RE .SH "DESCRIPTION" .PP We use a number of factors to determine which is the next node that should appear on a given node\*(Aqs fallback list\&. The node should not have appeared already in \fInode\fR\*(Aqs fallback list, and it should be the next closest node according to the distance array (which contains arbitrary distance values from each node to each node in the system), and should also prefer nodes with no CPUs, since presumably they\*(Aqll have very little allocation pressure on them otherwise\&. It returns \-1 if no node is found\&. .SH "COPYRIGHT" .br