lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-82897b4fd3920ffd2456731d4f2ae1406558ef4c@git.kernel.org>
Date:	Wed, 18 Dec 2013 02:33:07 -0800
From:	tip-bot for Wanpeng Li <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	liwanp@...ux.vnet.ibm.com, peterz@...radead.org,
	n-horiguchi@...jp.nec.com, riel@...hat.com,
	akpm@...ux-foundation.org, mgorman@...e.de, tglx@...utronix.de,
	rientjes@...gle.com
Subject: [tip:sched/core] sched/numa:
  Use wrapper function task_faults_idx to calculate index in group_faults

Commit-ID:  82897b4fd3920ffd2456731d4f2ae1406558ef4c
Gitweb:     http://git.kernel.org/tip/82897b4fd3920ffd2456731d4f2ae1406558ef4c
Author:     Wanpeng Li <liwanp@...ux.vnet.ibm.com>
AuthorDate: Thu, 12 Dec 2013 15:23:25 +0800
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 17 Dec 2013 15:24:40 +0100

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@...ux.vnet.ibm.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Acked-by: Mel Gorman <mgorman@...e.de>
Acked-by: David Rientjes <rientjes@...gle.com>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Rik van Riel <riel@...hat.com>
Link: http://lkml.kernel.org/r/1386833006-6600-3-git-send-email-liwanp@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/sched/fair.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ebdb08b..37892d7 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -921,7 +921,8 @@ static inline unsigned long group_faults(struct task_struct *p, int nid)
 	if (!p->numa_group)
 		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)];
 }
 
 /*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ