Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754052AbXEGKLj (ORCPT ); Mon, 7 May 2007 06:11:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754089AbXEGKLj (ORCPT ); Mon, 7 May 2007 06:11:39 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:55933 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754052AbXEGKLi (ORCPT ); Mon, 7 May 2007 06:11:38 -0400 Date: Mon, 07 May 2007 19:10:05 +0900 Message-ID: <87bqgxrlky.wl%takeuchi_satoru@jp.fujitsu.com> From: Satoru Takeuchi To: Linux Kernel Cc: Rusty Russell , Srivatsa Vaddagiri , Zwane Mwaikambo , Nathan Lynch , Joel Schopp , Ashok Raj , Heiko Carstens , Satoru Takeuchi Subject: [BUG] cpu-hotplug: Can't offline the CPU with naughty realtime processes User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1063 Lines: 35 Hi, I found a bug on 2.6.21 cpu-hotplug code. When process A on CPU0 try to offline the CPU1 on which the process B, realtime process (its task->policy == SCHED_FIFO or SCHED_RR) running without sleep or yield, both CPU0 and CPU1 get hang. It's because of the following code on __stop_machine_run(). struct task_struct *__stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu) { ... p = kthread_create(do_stop, &smdata, "kstopmachine"); if (!IS_ERR(p)) { kthread_bind(p, cpu); wake_up_process(p); wait_for_completion(&smdata.done); } ... } kstopmachine is created, bound to the CPU1, and woken up here, but this process can't start to run because reschedule doesn't occur on CPU1. Hence CPU0 also be able to run because it's waiting completion of CPU1's offline work. Thanks, Sat - 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/