mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
sched/numa: Use wrapper function task_faults_idx to calculate index in group_faults
Use wrapper function task_faults_idx to calculate index in group_faults. Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Mel Gorman <mgorman@suse.de> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Rik van Riel <riel@redhat.com> Link: http://lkml.kernel.org/r/1386833006-6600-3-git-send-email-liwanp@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
de1b301a19
commit
82897b4fd3
@ -921,7 +921,8 @@ static inline unsigned long group_faults(struct task_struct *p, int nid)
|
|||||||
if (!p->numa_group)
|
if (!p->numa_group)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return p->numa_group->faults[2*nid] + p->numa_group->faults[2*nid+1];
|
return p->numa_group->faults[task_faults_idx(nid, 0)] +
|
||||||
|
p->numa_group->faults[task_faults_idx(nid, 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user