From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754749Ab2KUKXn (ORCPT ); Wed, 21 Nov 2012 05:23:43 -0500 Received: from cantor2.suse.de ([195.135.220.15]:44128 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754573Ab2KUKXK (ORCPT ); Wed, 21 Nov 2012 05:23:10 -0500 From: Mel Gorman To: Peter Zijlstra , Andrea Arcangeli , Ingo Molnar Cc: Rik van Riel , Johannes Weiner , Hugh Dickins , Thomas Gleixner , Paul Turner , Lee Schermerhorn , Alex Shi , Linus Torvalds , Andrew Morton , Linux-MM , LKML , Mel Gorman Subject: [PATCH 45/46] balancenuma: no task swap in finding placement Date: Wed, 21 Nov 2012 10:21:51 +0000 Message-Id: <1353493312-8069-46-git-send-email-mgorman@suse.de> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <1353493312-8069-1-git-send-email-mgorman@suse.de> References: <1353493312-8069-1-git-send-email-mgorman@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hillf Danton Node is selected on behalf of given task, but no reason to punish the currently running tasks on other nodes. That punishment maybe benifit, who knows. Better if they are treated not in random way. Signed-off-by: Hillf Danton --- kernel/sched/fair.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2c9300f..5cc5b60 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -873,7 +873,7 @@ static inline unsigned long balancenuma_mm_weight(struct task_struct *p, /* * Examines all other nodes examining remote tasks to see if there would - * be fewer remote numa faults if tasks swapped home nodes + * be fewer remote numa faults */ static void task_numa_find_placement(struct task_struct *p) { @@ -932,13 +932,6 @@ static void task_numa_find_placement(struct task_struct *p) continue; } - /* Ensure the other task can be swapped */ - if (!cpumask_test_cpu(this_cpu, - tsk_cpus_allowed(other_task))) { - raw_spin_unlock_irq(&rq->lock); - continue; - } - /* * Read the fault statistics. If the remote task is a * thread in the process then use the task statistics. @@ -972,8 +965,7 @@ compare_other: this_diff = this_weight - p_weight; /* - * Would swapping the tasks reduce the overall - * cross-node NUMA faults? + * Would nid reduce the overall cross-node NUMA faults? */ if (other_diff > 0 && this_diff > 0) { long weight_diff = other_diff + this_diff; @@ -994,11 +986,8 @@ compare_other: } } - /* Swap the task on the selected target node */ if (selected_nid != -1 && selected_nid != this_nid) { sched_setnode(p, selected_nid); - if (selected_task) - sched_setnode(selected_task, this_nid); } } -- 1.7.9.2