Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422718AbWHECtx (ORCPT ); Fri, 4 Aug 2006 22:49:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422719AbWHECtx (ORCPT ); Fri, 4 Aug 2006 22:49:53 -0400 Received: from mx1.redhat.com ([66.187.233.31]:1257 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S1422718AbWHECtw (ORCPT ); Fri, 4 Aug 2006 22:49:52 -0400 Date: Fri, 4 Aug 2006 22:49:47 -0400 From: Dave Jones To: Linus Torvalds , Michal Piotrowski , LKML Subject: Re: 2.6.18-rc3-g3b445eea BUG: warning at /usr/src/linux-git/kernel/cpu.c:51/unlock_cpu_hotplug() Message-ID: <20060805024947.GE13393@redhat.com> Mail-Followup-To: Dave Jones , Linus Torvalds , Michal Piotrowski , LKML References: <6bffcb0e0608041204u4dad7cd6rab0abc3eca6747c0@mail.gmail.com> <20060804222400.GC18792@redhat.com> <20060805003142.GH18792@redhat.com> <20060805021051.GA13393@redhat.com> <20060805022356.GC13393@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060805022356.GC13393@redhat.com> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3333 Lines: 94 On Fri, Aug 04, 2006 at 10:23:56PM -0400, Dave Jones wrote: > Duh. Everything becomes clearer the moment you post a diff to lkml. Right, with that silly thinko out of the way, things make _slightly_ more sense, but I'm still puzzled. Here's the trace (with the DWARF noise stripped out). CPU1 called lock_cpu_hotplug() for app cpuspeed. recursive_depth=0 [] show_trace_log_lvl+0x58/0x152 [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] lock_cpu_hotplug+0x39/0xbf [] store_scaling_governor+0x142/0x1a3 [] store+0x37/0x48 [] sysfs_write_file+0xab/0xd1 [] vfs_write+0xab/0x157 [] sys_write+0x3b/0x60 [] sysenter_past_esp+0x56/0x8d cpuspeed acquired cpu_bitmask_lock CPU1 called lock_cpu_hotplug() for app cpuspeed. recursive_depth=0 [] show_trace_log_lvl+0x58/0x152 [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] lock_cpu_hotplug+0x39/0xbf [] __create_workqueue+0x52/0x122 [] cpufreq_governor_dbs+0x9f/0x2c3 [cpufreq_ondemand] [] __cpufreq_governor+0x57/0xd8 [] __cpufreq_set_policy+0x14e/0x1bc [] store_scaling_governor+0x159/0x1a3 [] store+0x37/0x48 [] sysfs_write_file+0xab/0xd1 [] vfs_write+0xab/0x157 [] sys_write+0x3b/0x60 [] sysenter_past_esp+0x56/0x8d Lukewarm IQ detected in hotplug locking BUG: warning at kernel/cpu.c:46/lock_cpu_hotplug() CPU1 called unlock_cpu_hotplug() for app cpuspeed. recursive_depth=1 [] show_trace_log_lvl+0x58/0x152 [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] unlock_cpu_hotplug+0x37/0xb7 [] __create_workqueue+0x100/0x122 [] cpufreq_governor_dbs+0x9f/0x2c3 [cpufreq_ondemand] [] __cpufreq_governor+0x57/0xd8 [] __cpufreq_set_policy+0x14e/0x1bc [] store_scaling_governor+0x159/0x1a3 [] store+0x37/0x48 [] sysfs_write_file+0xab/0xd1 [] vfs_write+0xab/0x157 [] sys_write+0x3b/0x60 [] sysenter_past_esp+0x56/0x8d CPU1 called unlock_cpu_hotplug() for app cpuspeed. recursive_depth=0 [] show_trace_log_lvl+0x58/0x152 [] show_trace+0xd/0x10 [] dump_stack+0x19/0x1b [] unlock_cpu_hotplug+0x37/0xb7 [] store_scaling_governor+0x179/0x1a3 [] store+0x37/0x48 [] sysfs_write_file+0xab/0xd1 [] vfs_write+0xab/0x157 [] sys_write+0x3b/0x60 [] sysenter_past_esp+0x56/0x8d So in these traces we're seeing lock lock unlock unlock But what I really don't understand is the ordering here. Immediately after that first trace we should see an unlock. store_scaling_governor does a lock/unlock pair, with no chance of returning with the hotplug lock still held. In the second trace however, cpuspeed is off doing something completely different. How can this happen? My head hurts. Dave -- http://www.codemonkey.org.uk - 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/