From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx185.postini.com [74.125.245.185]) by kanga.kvack.org (Postfix) with SMTP id 982C16B00B7 for ; Sun, 2 Dec 2012 13:45:11 -0500 (EST) Received: by mail-ee0-f41.google.com with SMTP id d41so1476612eek.14 for ; Sun, 02 Dec 2012 10:45:11 -0800 (PST) From: Ingo Molnar Subject: [PATCH 34/52] sched: Average the fault stats longer Date: Sun, 2 Dec 2012 19:43:26 +0100 Message-Id: <1354473824-19229-35-git-send-email-mingo@kernel.org> In-Reply-To: <1354473824-19229-1-git-send-email-mingo@kernel.org> References: <1354473824-19229-1-git-send-email-mingo@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Peter Zijlstra , Paul Turner , Lee Schermerhorn , Christoph Lameter , Rik van Riel , Mel Gorman , Andrew Morton , Andrea Arcangeli , Linus Torvalds , Thomas Gleixner , Johannes Weiner , Hugh Dickins We will rely on the per CPU fault statistics and its shared/private derivative even more in the future, so stabilize this metric even better. The staged updates introduced in commit: sched: Introduce staged average NUMA faults Already stabilized this key metric significantly, but in real workloads it was still reacting to temporary load balancing transients too quickly. Slow down by weighting the average. The weighting value was found via experimentation. Cc: Linus Torvalds Cc: Andrew Morton Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: Rik van Riel Cc: Mel Gorman Cc: Hugh Dickins Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 24a5588..a5f3ad7 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -914,8 +914,8 @@ static void task_numa_placement(struct task_struct *p) p->numa_faults_curr[idx] = 0; /* Keep a simple running average: */ - p->numa_faults[idx] += new_faults; - p->numa_faults[idx] /= 2; + p->numa_faults[idx] = p->numa_faults[idx]*7 + new_faults; + p->numa_faults[idx] /= 8; faults += p->numa_faults[idx]; total[priv] += p->numa_faults[idx]; -- 1.7.11.7 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org