lkml.org 
[lkml]   [2013]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 16/18] sched: Avoid overloading CPUs on a preferred NUMA node
From
On Mon, Jul 15, 2013 at 11:20 PM, Mel Gorman <mgorman@suse.de> wrote:
> +
> +static int task_numa_find_cpu(struct task_struct *p, int nid)
> +{
> + int node_cpu = cpumask_first(cpumask_of_node(nid));
[...]
>
> + /* No harm being optimistic */
> + if (idle_cpu(node_cpu))
> + return node_cpu;
>
[...]
> + for_each_cpu(cpu, cpumask_of_node(nid)) {
> + dst_load = target_load(cpu, idx);
> +
> + /* If the CPU is idle, use it */
> + if (!dst_load)
> + return dst_cpu;
> +
Here you want cpu, instead of dst_cpu, I guess.


\
 
 \ /
  Last update: 2013-07-16 18:43    [W:1.080 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site