lkml.org 
[lkml]   [2014]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] sched,numa: count pages on active node as local
On 04/11/2014 01:34 PM, Joe Perches wrote:
> On Fri, 2014-04-11 at 13:00 -0400, riel@redhat.com wrote:
>> This should reduce the overhead of the automatic NUMA placement
>> code, when a workload spans multiple NUMA nodes.
>
> trivial style note:
>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> []
>> @@ -1737,6 +1737,7 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
>> struct task_struct *p = current;
>> bool migrated = flags & TNF_MIGRATED;
>> int cpu_node = task_node(current);
>> + int local = !!(flags & TNF_FAULT_LOCAL);
>
> Perhaps local would look nicer as bool
> and be better placed next to migrated.

The problem is, at the end of the function, local is used as an
array index...

p->numa_faults_locality[local] += pages;
}

I'm not sure I really want to use a bool as an array index :)

--
All rights reversed


\
 
 \ /
  Last update: 2014-04-11 20:01    [W:0.204 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site