From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965044AbXDAUwv (ORCPT ); Sun, 1 Apr 2007 16:52:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965095AbXDAUwv (ORCPT ); Sun, 1 Apr 2007 16:52:51 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:50565 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965044AbXDAUwu convert rfc822-to-8bit (ORCPT ); Sun, 1 Apr 2007 16:52:50 -0400 From: "Rafael J. Wysocki" To: Andrew Morton Subject: Re: 2.6.21-rc5-mm3 Date: Sun, 1 Apr 2007 22:56:27 +0200 User-Agent: KMail/1.9.5 Cc: Michal Piotrowski , linux-kernel@vger.kernel.org, Pavel Machek , john stultz , Thomas Gleixner References: <20070330010559.2a232d9a.akpm@linux-foundation.org> <20070401120305.932a493b.akpm@linux-foundation.org> <200704012239.01964.rjw@sisk.pl> In-Reply-To: <200704012239.01964.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200704012256.28850.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sunday, 1 April 2007 22:39, Rafael J. Wysocki wrote: > On Sunday, 1 April 2007 21:03, Andrew Morton wrote: > > On Sun, 01 Apr 2007 18:00:12 +0200 Michal Piotrowski wrote: > > > > > Andrew Morton napisaƂ(a): > > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc5/2.6.21-rc5-mm3/ > > > > > > > > > > BUG: at /mnt/md0/devel/linux-mm/arch/i386/kernel/smp.c:571 native_smp_call_function_mask() > > > [] dump_trace+0x63/0x1eb > > > [] show_trace_log_lvl+0x1a/0x30 > > > [] show_trace+0x12/0x14 > > > [] dump_stack+0x16/0x18 > > > [] native_smp_call_function_mask+0x57/0x14b > > > [] smp_call_function+0x1e/0x22 > > > [] on_each_cpu+0x2a/0x73 > > > [] clock_was_set+0x1b/0x1d > > > [] timekeeping_resume+0xb5/0xbb > > > [] __sysdev_resume+0x17/0x5d > > > [] sysdev_resume+0x19/0x4b > > > [] device_power_up+0xb/0x12 > > > [] swsusp_suspend+0x55/0x63 > > > [] pm_suspend_disk+0x163/0x28f > > > [] enter_state+0x54/0x1d5 > > > [] state_store+0x86/0x9c > > > [] subsys_attr_store+0x23/0x2b > > > [] sysfs_write_file+0xc1/0xe9 > > > [] vfs_write+0xd1/0x15a > > > [] sys_write+0x3d/0x72 > > > [] syscall_call+0x7/0xb > > > [] 0xb7f9b410 > > > > We're calling smp_call_function() with local interrupts disabled, which is > > deadlockable. > > > > This, I expect, is because swsusp_suspend() optimistically tries to run > > everything with local interrupts disabled. > > Well, not everything, but device_power_down()/device_power_up() which only > handle sysdevs. > > > I don't know why this has suddenly started happening - > > timekeeping_resume()->clock_was_set()->on_each_cpu() has been there for a > > while. Doesn't mainline do the same thing? > > Yes, and it has always done it. It even is documented in > Documentation/power/devices.txt:System Devices . ;-) > > > Not sure what to do about this. The best fix would be to teach swsusp to > > not be so optmistic: resume functions are called with local irqs _enabled_ > > - that's part of their call environment. swsusp tries to call them with > > local irqs disabled and bad things happen. > > I think timekeeping_resume() shouldn't call smp_call_function() ... ... which even is unnecessary, because sysdev_resume() runs on _one_ CPU.