Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756589AbYHNSV6 (ORCPT ); Thu, 14 Aug 2008 14:21:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752001AbYHNSVu (ORCPT ); Thu, 14 Aug 2008 14:21:50 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:17639 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903AbYHNSVs (ORCPT ); Thu, 14 Aug 2008 14:21:48 -0400 X-IronPort-AV: E=McAfee;i="5200,2160,5361"; a="5545570" Message-ID: <48A477B8.9090704@qualcomm.com> Date: Thu, 14 Aug 2008 11:21:44 -0700 From: Max Krasnyansky User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Ingo Molnar CC: Paul Jackson , linux-kernel@vger.kernel.org, menage@google.com, a.p.zijlstra@chello.nl, vegard.nossum@gmail.com, Dmitry Torokhov Subject: Re: [PATCH] cpuset: Rework sched domains and CPU hotplug handling (take 4) References: <1218490433-10576-1-git-send-email-maxk@qualcomm.com> <20080811183122.acd25489.pj@sgi.com> <20080814092424.GB18771@elte.hu> <20080814111633.GA2614@elte.hu> In-Reply-To: <20080814111633.GA2614@elte.hu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9605 Lines: 182 Ingo Molnar wrote: > * Ingo Molnar wrote: > >> * Paul Jackson wrote: >> >>> Acked-by: Paul Jackson >>> >>> ... based on code reading and comparing with the >>> previous version - looks good. Nice work, Max. >>> Thanks. >> applied to tip/sched/cpuset, thanks. (will show up in tip/sched/urgent >> as well soon, for v2.6.27 merging.) > > FYI, this new lockdep warning showed up in -tip testing, after i added > this patch. Hmm, unless I'm missing something this one is unrelated. There are no cpu hotplug, sched or cpusets paths in the trace besides cpu_maps_update_begin(). But that one is taken in the regular destroy_workqueue() path. The issues is polldev_mutex and cpu_add_remove_lock nesting. I bet you can trigger that without cpusets. CC'ing Dmitry Torokhov. btw It seems to be triggered when X closes polled input device. There aren't that many of them $ git grep input_register_polled_device | wc -l 16 What do you have hooked up to the test box ? Max > [ 59.750200] ======================================================= > [ 59.750200] [ INFO: possible circular locking dependency detected ] > [ 59.750200] 2.6.27-rc3-tip-00076-g75f9a29-dirty #1 > [ 59.750200] ------------------------------------------------------- > [ 59.750200] Xorg/6623 is trying to acquire lock: > [ 59.750200] (cpu_add_remove_lock){--..}, at: [] cpu_maps_update_begin+0x14/0x16 > [ 59.750200] > [ 59.750200] but task is already holding lock: > [ 59.750200] (polldev_mutex){--..}, at: [] input_close_polled_device+0x22/0x47 > [ 59.750200] > [ 59.750200] which lock already depends on the new lock. > [ 59.750200] > [ 59.750200] > [ 59.750200] the existing dependency chain (in reverse order) is: > [ 59.750200] > [ 59.750200] -> #5 (polldev_mutex){--..}: > [ 59.750200] [] __lock_acquire+0x848/0x9ab > [ 59.750200] [] lock_acquire+0x70/0x97 > [ 59.750200] [] __mutex_lock_common+0x8a/0x278 > [ 59.750200] [] mutex_lock_interruptible_nested+0x2e/0x35 > [ 59.750200] [] input_open_polled_device+0x1c/0xa3 > [ 59.750200] [] input_open_device+0x5a/0x86 > [ 59.750200] [] evdev_open+0x103/0x14e > [ 59.750200] [] input_open_file+0x44/0x60 > [ 59.750200] [] chrdev_open+0x106/0x11d > [ 59.750200] [] __dentry_open+0x119/0x1f0 > [ 59.750200] [] nameidata_to_filp+0x24/0x38 > [ 59.750200] [] do_filp_open+0x309/0x5b2 > [ 59.750200] [] do_sys_open+0x47/0xc1 > [ 59.750200] [] sys_open+0x23/0x2b > [ 59.750200] [] sysenter_do_call+0x12/0x43 > [ 59.750200] [] 0xffffffff > [ 59.750200] > [ 59.750200] -> #4 (&dev->mutex){--..}: > [ 59.750200] [] __lock_acquire+0x848/0x9ab > [ 59.750200] [] lock_acquire+0x70/0x97 > [ 59.750200] [] __mutex_lock_common+0x8a/0x278 > [ 59.750200] [] mutex_lock_interruptible_nested+0x2e/0x35 > [ 59.750200] [] input_register_handle+0x26/0x80 > [ 59.750200] [] kbd_connect+0x6c/0x95 > [ 59.750200] [] input_attach_handler+0x38/0x6b > [ 59.750200] [] input_register_handler+0x7b/0xaf > [ 59.750200] [] kbd_init+0x6b/0x87 > [ 59.750200] [] vty_init+0xd3/0xdc > [ 59.750200] [] tty_init+0x198/0x19c > [ 59.750200] [] do_one_initcall+0x42/0x133 > [ 59.750200] [] kernel_init+0x17b/0x1e2 > [ 59.750200] [] kernel_thread_helper+0x7/0x10 > [ 59.750200] [] 0xffffffff > [ 59.750200] > [ 59.750200] -> #3 (input_mutex){--..}: > [ 59.750200] [] __lock_acquire+0x848/0x9ab > [ 59.750200] [] lock_acquire+0x70/0x97 > [ 59.750200] [] __mutex_lock_common+0x8a/0x278 > [ 59.750200] [] mutex_lock_interruptible_nested+0x2e/0x35 > [ 59.750200] [] input_register_device+0xff/0x171 > [ 59.750200] [] acpi_button_add+0x320/0x421 > [ 59.750200] [] acpi_device_probe+0x3f/0x8d > [ 59.750200] [] driver_probe_device+0xc3/0x156 > [ 59.750200] [] __driver_attach+0x42/0x64 > [ 59.750200] [] bus_for_each_dev+0x43/0x65 > [ 59.750200] [] driver_attach+0x19/0x1b > [ 59.750200] [] bus_add_driver+0xaf/0x1b5 > [ 59.750200] [] driver_register+0x76/0xd2 > [ 59.750200] [] acpi_bus_register_driver+0x3f/0x41 > [ 59.750200] [] acpi_button_init+0x37/0x56 > [ 59.750200] [] do_one_initcall+0x42/0x133 > [ 59.750200] [] do_async_initcalls+0x1f/0x2f > [ 59.750200] [] run_workqueue+0xb7/0x189 > [ 59.750200] [] worker_thread+0xbb/0xc7 > [ 59.750200] [] kthread+0x40/0x67 > [ 59.750200] [] kernel_thread_helper+0x7/0x10 > [ 59.750200] [] 0xffffffff > [ 59.750200] > [ 59.750200] -> #2 (async_work){--..}: > [ 59.750200] [] __lock_acquire+0x848/0x9ab > [ 59.750200] [] lock_acquire+0x70/0x97 > [ 59.750200] [] run_workqueue+0xb2/0x189 > [ 59.750200] [] worker_thread+0xbb/0xc7 > [ 59.750200] [] kthread+0x40/0x67 > [ 59.750200] [] kernel_thread_helper+0x7/0x10 > [ 59.750200] [] 0xffffffff > [ 59.750200] > [ 59.750200] -> #1 (kasyncinit){--..}: > [ 59.750200] [] __lock_acquire+0x848/0x9ab > [ 59.750200] [] lock_acquire+0x70/0x97 > [ 59.750200] [] cleanup_workqueue_thread+0x2b/0x5e > [ 59.750200] [] destroy_workqueue+0x61/0x89 > [ 59.750200] [] kernel_init+0x19f/0x1e2 > [ 59.750200] [] kernel_thread_helper+0x7/0x10 > [ 59.750200] [] 0xffffffff > [ 59.750200] > [ 59.750200] -> #0 (cpu_add_remove_lock){--..}: > [ 59.750200] [] __lock_acquire+0x719/0x9ab > [ 59.750200] [] lock_acquire+0x70/0x97 > [ 59.750200] [] __mutex_lock_common+0x8a/0x278 > [ 59.750200] [] mutex_lock_nested+0x2e/0x36 > [ 59.750200] [] cpu_maps_update_begin+0x14/0x16 > [ 59.750200] [] destroy_workqueue+0x26/0x89 > [ 59.750200] [] input_close_polled_device+0x3b/0x47 > [ 59.750200] [] input_close_device+0x45/0x61 > [ 59.750200] [] evdev_release+0x7f/0x99 > [ 59.750200] [] __fput+0xb3/0x135 > [ 59.750200] [] fput+0x1c/0x21 > [ 59.750200] [] filp_close+0x4c/0x56 > [ 59.750200] [] sys_close+0x6d/0xa6 > [ 59.750200] [] sysenter_do_call+0x12/0x43 > [ 59.750200] [] 0xffffffff > [ 59.750200] > [ 59.750200] other info that might help us debug this: > [ 59.750200] > [ 59.750200] 3 locks held by Xorg/6623: > [ 59.750200] #0: (&evdev->mutex){--..}, at: [] evdev_release+0x67/0x99 > [ 59.750200] #1: (&dev->mutex){--..}, at: [] input_close_device+0x1f/0x61 > [ 59.750200] #2: (polldev_mutex){--..}, at: [] input_close_polled_device+0x22/0x47 > [ 59.750200] > [ 59.750200] stack backtrace: > [ 59.750200] Pid: 6623, comm: Xorg Not tainted 2.6.27-rc3-tip-00076-g75f9a29-dirty #1 > [ 59.750200] [] print_circular_bug_tail+0x5d/0x68 > [ 59.750200] [] __lock_acquire+0x719/0x9ab > [ 59.750200] [] lock_acquire+0x70/0x97 > [ 59.750200] [] ? cpu_maps_update_begin+0x14/0x16 > [ 59.750200] [] __mutex_lock_common+0x8a/0x278 > [ 59.750200] [] ? cpu_maps_update_begin+0x14/0x16 > [ 59.750200] [] ? trace_hardirqs_on_caller+0x94/0xcd > [ 59.750200] [] mutex_lock_nested+0x2e/0x36 > [ 59.750200] [] ? cpu_maps_update_begin+0x14/0x16 > [ 59.750200] [] cpu_maps_update_begin+0x14/0x16 > [ 59.750200] [] destroy_workqueue+0x26/0x89 > [ 59.750200] [] input_close_polled_device+0x3b/0x47 > [ 59.750200] [] input_close_device+0x45/0x61 > [ 59.750200] [] evdev_release+0x7f/0x99 > [ 59.750200] [] __fput+0xb3/0x135 > [ 59.750200] [] fput+0x1c/0x21 > [ 59.750200] [] filp_close+0x4c/0x56 > [ 59.750200] [] sys_close+0x6d/0xa6 > [ 59.750200] [] sysenter_do_call+0x12/0x43 > [ 59.750200] [] ? x86_decode_insn+0x46e/0x942 > [ 59.750200] ======================= > -- > 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/ > -- 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/