lkml.org 
[lkml]   [2014]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] sched,numa: weigh nearby nodes for task placement on complex NUMA topologies
On Thu, May 08, 2014 at 01:23:29PM -0400, riel@redhat.com wrote:
> + /*
> + * For nodes with distances in-between LOCAL_DISTANCE
> + * and max_distance, we count the faults on those nodes
> + * in proportion to their distance, using this formula:
> + *
> + * max_distance - node_distance
> + * -----------------------------
> + * max_distance - LOCAL_DISTANCE
> + */
> + if (task)
> + faults = task_faults(p, node);
> + else
> + faults = group_faults(p, node);
> +
> + score += 1000 * faults *
> + (max_distance - distance) /
> + (max_distance - LOCAL_DISTANCE);

OK that makes sense, except I would suggest you use a power-of-two scale
factor :-)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-05-09 12:41    [W:0.114 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site