Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755429AbZLTQhL (ORCPT ); Sun, 20 Dec 2009 11:37:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755373AbZLTQhJ (ORCPT ); Sun, 20 Dec 2009 11:37:09 -0500 Received: from casper.infradead.org ([85.118.1.10]:47778 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754325AbZLTQhI (ORCPT ); Sun, 20 Dec 2009 11:37:08 -0500 Subject: [PATCH] sched: Fix hotplug From: Peter Zijlstra To: Jens Axboe Cc: Sachin Sant , linux-kernel , Ingo Molnar , Heiko Carstens , Benjamin Herrenschmidt In-Reply-To: <20091220145715.GZ4489@kernel.dk> References: <4B2DF699.3090107@in.ibm.com> <1261315887.4314.8.camel@laptop> <20091220145151.GY4489@kernel.dk> <1261320896.4314.10.camel@laptop> <20091220145715.GZ4489@kernel.dk> Content-Type: text/plain; charset="UTF-8" Date: Sun, 20 Dec 2009 17:36:27 +0100 Message-ID: <1261326987.4314.24.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 977 Lines: 29 The hot-unplug kstopmachine usage does a wakeup after deactivating the cpu, hence we cannot use cpu_active() here but must rely on the good olde online. Signed-off-by: Peter Zijlstra --- kernel/sched.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/sched.c b/kernel/sched.c index 720df10..0ac4fa5 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2348,7 +2348,7 @@ int select_task_rq(struct task_struct *p, int sd_flags, int wake_flags) * not worry about this generic constraint ] */ if (unlikely(!cpumask_test_cpu(cpu, &p->cpus_allowed) || - !cpu_active(cpu))) + !cpu_online(cpu))) cpu = select_fallback_rq(task_cpu(p), p); return cpu; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/