From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by kanga.kvack.org (Postfix) with ESMTP id C20B86B005C for ; Fri, 6 Dec 2013 04:12:35 -0500 (EST) Received: by mail-pd0-f182.google.com with SMTP id v10so693581pde.27 for ; Fri, 06 Dec 2013 01:12:35 -0800 (PST) Received: from e28smtp03.in.ibm.com (e28smtp03.in.ibm.com. [122.248.162.3]) by mx.google.com with ESMTPS id pt8si60767545pac.76.2013.12.06.01.12.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 06 Dec 2013 01:12:34 -0800 (PST) Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Dec 2013 14:42:31 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 3C102E0053 for ; Fri, 6 Dec 2013 14:44:43 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rB69CIO925493708 for ; Fri, 6 Dec 2013 14:42:19 +0530 Received: from d28av05.in.ibm.com (localhost [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rB69CP8b019710 for ; Fri, 6 Dec 2013 14:42:25 +0530 From: Wanpeng Li Subject: [PATCH v2 4/6] sched/numa: use wrapper function task_node to get node which task is on Date: Fri, 6 Dec 2013 17:12:14 +0800 Message-Id: <1386321136-27538-4-git-send-email-liwanp@linux.vnet.ibm.com> In-Reply-To: <1386321136-27538-1-git-send-email-liwanp@linux.vnet.ibm.com> References: <1386321136-27538-1-git-send-email-liwanp@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Ingo Molnar , Andrew Morton Cc: Peter Zijlstra , Mel Gorman , Rik van Riel , Naoya Horiguchi , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Wanpeng Li Use wrapper function task_node to get node which task is on. Signed-off-by: Wanpeng Li --- kernel/sched/fair.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 56bcc0c..e0b1063 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1216,7 +1216,7 @@ static int task_numa_migrate(struct task_struct *p) * elsewhere, so there is no point in (re)trying. */ if (unlikely(!sd)) { - p->numa_preferred_nid = cpu_to_node(task_cpu(p)); + p->numa_preferred_nid = task_node(p); return -EINVAL; } @@ -1283,7 +1283,7 @@ static void numa_migrate_preferred(struct task_struct *p) p->numa_migrate_retry = jiffies + HZ; /* Success if task is already running on preferred CPU */ - if (cpu_to_node(task_cpu(p)) == p->numa_preferred_nid) + if (task_node(p) == p->numa_preferred_nid) return; /* Otherwise, try migrate to a CPU on the preferred node */ -- 1.7.7.6 -- 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