From: Stephen Warren Subject: CPU hotplug hang due to "swap: make each swap partition have one address_space" Date: Fri, 01 Feb 2013 22:02:33 -0700 Message-ID: <510C9DE9.9040207@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from avon.wwwdotorg.org ([70.85.31.133]:48985 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750696Ab3BBFCf (ORCPT ); Sat, 2 Feb 2013 00:02:35 -0500 Sender: linux-next-owner@vger.kernel.org List-ID: To: Shaohua Li Cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-next@vger.kernel.org" , Andrew Morton , Rik van Riel , Minchan Kim , Joseph Lo Shaohua, In next-20130128, commit 174f064 "swap: make each swap partition have one address_space" (from the mm/akpm tree) appears causes a hang/RCU stall for me when hot-unplugging a CPU. I'm running on a quad-core ARM system, and hot-unplugging a CPU using: echo 0 > /sys/devices/system/cpu/cpu2/online CONFIG_SWAP is enabled, but I don't have any swap devices activated. If I either disable CONFIG_SWAP, or revert commit 174f064, then CPU hotplug works fine for me. I read through the patch and didn't see anything obvious, but I'm not remotely familiar with the code in question. Do you have any idea what might be wrong? Thanks. The RCU stall kernel log is: > [ 36.152471] CPU2: shutdown > [ 57.151682] INFO: rcu_sched self-detected stall on CPU { 1} (t=2100 jiffies g=4294966997 c=4294966996 q=1) > [ 57.164730] [] (unwind_backtrace+0x0/0xf8) from [] (rcu_check_callbacks+0x360/0x81c) > [ 57.177468] [] (rcu_check_callbacks+0x360/0x81c) from [] (update_process_times+0x38/0x64) > [ 57.182152] INFO: rcu_sched detected stalls on CPUs/tasks: { 1} (detected by 3, t=2103 jiffies, g=4294966997, c=4294966996, q=1) > [ 57.182154] Task dump for CPU 1: > [ 57.182162] sh R running 0 569 568 0x00000002 > [ 57.182200] [] (__schedule+0x33c/0x6ac) from [] (__irq_svc+0x40/0x70) > [ 57.182211] [] (__irq_svc+0x40/0x70) from [] (_raw_spin_unlock_irqrestore+0x28/0x50) > [ 57.182221] [] (_raw_spin_unlock_irqrestore+0x28/0x50) from [] (percpu_counter_hotcpu_callback+0x68/0x9c) > [ 57.182235] [] (percpu_counter_hotcpu_callback+0x68/0x9c) from [] (notifier_call_chain+0x44/0x84) > [ 57.182246] [] (notifier_call_chain+0x44/0x84) from [] (__cpu_notify+0x28/0x44) > [ 57.182255] [] (__cpu_notify+0x28/0x44) from [] (cpu_notify_nofail+0x8/0x14) > [ 57.182276] [] (cpu_notify_nofail+0x8/0x14) from [] (_cpu_down+0xf8/0x25c) > [ 57.182286] [] (_cpu_down+0xf8/0x25c) from [] (cpu_down+0x24/0x40) > [ 57.182296] [] (cpu_down+0x24/0x40) from [] (store_online+0x30/0x78) > [ 57.182317] [] (store_online+0x30/0x78) from [] (dev_attr_store+0x18/0x24) > [ 57.182332] [] (dev_attr_store+0x18/0x24) from [] (sysfs_write_file+0x168/0x198) > [ 57.182354] [] (sysfs_write_file+0x168/0x198) from [] (vfs_write+0x9c/0x140) > [ 57.182364] [] (vfs_write+0x9c/0x140) from [] (sys_write+0x3c/0x70) > [ 57.182374] [] (sys_write+0x3c/0x70) from [] (ret_fast_syscall+0x0/0x30) > [ 57.404633] [] (update_process_times+0x38/0x64) from [] (tick_sched_timer+0x44/0x74) > [ 57.418340] [] (tick_sched_timer+0x44/0x74) from [] (__run_hrtimer.isra.15+0x58/0x114) > [ 57.432362] [] (__run_hrtimer.isra.15+0x58/0x114) from [] (hrtimer_interrupt+0x100/0x290) > [ 57.446620] [] (hrtimer_interrupt+0x100/0x290) from [] (twd_handler+0x2c/0x40) > [ 57.459981] [] (twd_handler+0x2c/0x40) from [] (handle_percpu_devid_irq+0x64/0x80) > [ 57.473749] [] (handle_percpu_devid_irq+0x64/0x80) from [] (generic_handle_irq+0x20/0x30) > [ 57.488197] [] (generic_handle_irq+0x20/0x30) from [] (handle_IRQ+0x38/0x94) > [ 57.501559] [] (handle_IRQ+0x38/0x94) from [] (gic_handle_irq+0x28/0x5c) > [ 57.514610] [] (gic_handle_irq+0x28/0x5c) from [] (__irq_svc+0x40/0x70) > [ 57.527606] Exception stack(0xed57be58 to 0xed57bea0) > [ 57.537292] be40: c06e5c50 20000113 > [ 57.550216] be60: 00000000 55ec55ec 00000000 00000000 00000002 c06ea074 c06daf08 c06e5c50 > [ 57.563134] be80: 00000000 00015ef8 00000000 ed57bea0 c04d4660 c04dae04 40000113 ffffffff > [ 57.576119] [] (__irq_svc+0x40/0x70) from [] (_raw_spin_unlock_irqrestore+0x28/0x50) > [ 57.590515] [] (_raw_spin_unlock_irqrestore+0x28/0x50) from [] (percpu_counter_hotcpu_callback+0x68/0x9c) > [ 57.606765] [] (percpu_counter_hotcpu_callback+0x68/0x9c) from [] (notifier_call_chain+0x44/0x84) > [ 57.622320] [] (notifier_call_chain+0x44/0x84) from [] (__cpu_notify+0x28/0x44) > [ 57.636338] [] (__cpu_notify+0x28/0x44) from [] (cpu_notify_nofail+0x8/0x14) > [ 57.650161] [] (cpu_notify_nofail+0x8/0x14) from [] (_cpu_down+0xf8/0x25c) > [ 57.663859] [] (_cpu_down+0xf8/0x25c) from [] (cpu_down+0x24/0x40) > [ 57.676850] [] (cpu_down+0x24/0x40) from [] (store_online+0x30/0x78) > [ 57.690010] [] (store_online+0x30/0x78) from [] (dev_attr_store+0x18/0x24) > [ 57.703767] [] (dev_attr_store+0x18/0x24) from [] (sysfs_write_file+0x168/0x198) > [ 57.717948] [] (sysfs_write_file+0x168/0x198) from [] (vfs_write+0x9c/0x140) > [ 57.731866] [] (vfs_write+0x9c/0x140) from [] (sys_write+0x3c/0x70) > [ 57.744841] [] (sys_write+0x3c/0x70) from [] (ret_fast_syscall+0x0/0x30)